mathtools

Abjad mathtools package.

Dependencies:

The mathtools package imports no other Abjad modules. Do not add modules to mathtools with intrapackage imports.


Lineage

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightslategrey, dpi=72, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_abctools { graph [label=abctools]; "abjad.tools.abctools.AbjadObject.AbjadObject" [color=1, group=0, label=AbjadObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" [color=1, group=0, label=AbstractBase, shape=box]; "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" [color=1, group=0, label=AbjadValueObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.abctools.AbjadValueObject.AbjadValueObject"; "abjad.tools.abctools.AbjadObject.AbstractBase" -> "abjad.tools.abctools.AbjadObject.AbjadObject"; } subgraph cluster_durationtools { graph [label=durationtools]; "abjad.tools.durationtools.Division.Division" [color=3, group=2, label=Division, shape=box]; } subgraph cluster_mathtools { graph [label=mathtools]; "abjad.tools.mathtools.BoundedObject.BoundedObject" [color=black, fontcolor=white, group=4, label=BoundedObject, shape=box, style="filled, rounded"]; "abjad.tools.mathtools.Infinity.Infinity" [color=black, fontcolor=white, group=4, label=Infinity, shape=box, style="filled, rounded"]; "abjad.tools.mathtools.NegativeInfinity.NegativeInfinity" [color=black, fontcolor=white, group=4, label=NegativeInfinity, shape=box, style="filled, rounded"]; "abjad.tools.mathtools.NonreducedFraction.NonreducedFraction" [color=black, fontcolor=white, group=4, label=NonreducedFraction, shape=box, style="filled, rounded"]; "abjad.tools.mathtools.NonreducedRatio.NonreducedRatio" [color=black, fontcolor=white, group=4, label=NonreducedRatio, shape=box, style="filled, rounded"]; "abjad.tools.mathtools.Ratio.Ratio" [color=black, fontcolor=white, group=4, label=Ratio, shape=box, style="filled, rounded"]; "abjad.tools.mathtools.Infinity.Infinity" -> "abjad.tools.mathtools.NegativeInfinity.NegativeInfinity"; "abjad.tools.mathtools.NonreducedRatio.NonreducedRatio" -> "abjad.tools.mathtools.Ratio.Ratio"; } subgraph cluster_timespantools { graph [label=timespantools]; "abjad.tools.timespantools.AnnotatedTimespan.AnnotatedTimespan" [color=7, group=6, label=AnnotatedTimespan, shape=box]; "abjad.tools.timespantools.Timespan.Timespan" [color=7, group=6, label=Timespan, shape=box]; "abjad.tools.timespantools.Timespan.Timespan" -> "abjad.tools.timespantools.AnnotatedTimespan.AnnotatedTimespan"; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } subgraph cluster_fractions { graph [label=fractions]; "fractions.Fraction" [color=4, group=3, label=Fraction, shape=box]; } subgraph cluster_numbers { graph [label=numbers]; "numbers.Complex" [color=6, group=5, label=Complex, shape=oval, style=bold]; "numbers.Number" [color=6, group=5, label=Number, shape=box]; "numbers.Rational" [color=6, group=5, label=Rational, shape=oval, style=bold]; "numbers.Real" [color=6, group=5, label=Real, shape=oval, style=bold]; "numbers.Complex" -> "numbers.Real"; "numbers.Number" -> "numbers.Complex"; "numbers.Real" -> "numbers.Rational"; } "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.mathtools.BoundedObject.BoundedObject"; "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.mathtools.Infinity.Infinity"; "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.mathtools.NonreducedFraction.NonreducedFraction"; "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" -> "abjad.tools.mathtools.NonreducedRatio.NonreducedRatio"; "abjad.tools.mathtools.BoundedObject.BoundedObject" -> "abjad.tools.timespantools.Timespan.Timespan"; "abjad.tools.mathtools.NonreducedFraction.NonreducedFraction" -> "abjad.tools.durationtools.Division.Division"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; "builtins.object" -> "numbers.Number"; "fractions.Fraction" -> "abjad.tools.mathtools.NonreducedFraction.NonreducedFraction"; "numbers.Rational" -> "fractions.Fraction"; }


Classes

BoundedObject Bounded object mix-in.
Infinity Object-oriented infinity.
NegativeInfinity Object-oriented negative infinity.
NonreducedFraction Initializes with an integer numerator and integer denominator:
NonreducedRatio Nonreduced ratio.
Ratio Ratio.

Functions

all_are_equal Is true when expr is a sequence and all elements in expr are equal:
all_are_integer_equivalent_exprs Is true when expr is a sequence and all elements in expr are integer-equivalent expressions.
all_are_integer_equivalent_numbers Is true when expr is a sequence and all elements in expr are integer-equivalent numbers.
all_are_nonnegative_integer_equivalent_numbers True expr is a sequence and when all elements in expr are nonnegative integer-equivalent numbers.
all_are_nonnegative_integer_powers_of_two Is true when expr is a sequence and all elements in expr are nonnegative integer powers of two.
all_are_nonnegative_integers Is true when expr is a sequence and all elements in expr are nonnegative integers.
all_are_numbers Is true when expr is a sequence and all elements in expr
all_are_pairs Is true when expr is a sequence whose members are all sequences of length 2.
all_are_pairs_of_types Is true when expr is a sequence whose members are all sequences of length 2, and where the first member of each pair is an instance of first_type and where the second member of each pair is an instance of second_type.
all_are_positive_integer_equivalent_numbers Is true when expr is a sequence and all elements in expr are positive integer-equivalent numbers.
all_are_positive_integer_powers_of_two Is true when expr is a sequence and all elements in expr are positive integer powers of two.
all_are_positive_integers Is true when expr is a sequence and all elements in expr are positive integers.
all_are_unequal Is true when expr is a sequence all elements in expr are unequal.
are_relatively_prime Is true when numbers_ is a sequence comprising zero or more numbers, all of which are relatively prime.
arithmetic_mean Arithmetic means of sequence as an exact integer.
binomial_coefficient Binomial coefficient of n choose k.
cumulative_products Cumulative products of sequence.
cumulative_signed_weights Cumulative signed weights of sequence.
cumulative_sums Cumulative sums of sequence.
cumulative_sums_pairwise Lists pairwise cumulative sums of sequence from 0.
difference_series Gets difference series of sequence.
divide_number_by_ratio Divides integer by ratio.
divisors Positive divisors of integer n in increasing order.
factors Prime factors less than or equal to positive integer n in increasing order.
fraction_to_proper_fraction Changes rational to proper fraction.
get_shared_numeric_sign Gets shared numeric sign of elements in sequence.
greatest_common_divisor Calculates greatest common divisor of integers.
greatest_multiple_less_equal Greatest integer multiple of m less than or equal to n.
greatest_power_of_two_less_equal Greatest integer power of two less than or equal to positive n.
integer_equivalent_number_to_integer Integer-equivalent number to integer.
integer_to_base_k_tuple Nonnegative integer n to base-k tuple.
integer_to_binary_string Positive integer n to binary string.
is_assignable_integer Is true when expr is equivalent to an integer and can be written without recourse to ties.
is_dotted_integer Is true when expr is equivalent to a positive integer and can be written with zero or more dots.
is_fraction_equivalent_pair Is true when expr is an integer-equivalent pair of numbers excluding 0 as the second term.
is_integer_equivalent_expr Is true when expr is an integer-equivalent number.
is_integer_equivalent_n_tuple Is true when expr is a tuple of n integer-equivalent expressions.
is_integer_equivalent_number Is true when expr is a number and expr is equivalent to an integer.
is_integer_equivalent_pair Is true when expr is a pair of integer-equivalent expressions.
is_integer_equivalent_singleton Is true when expr is a singleton of integer-equivalent expressions.
is_integer_n_tuple Is true when expr is an integer tuple of length n.
is_integer_pair Is true when expr is an integer tuple of length 2.
is_integer_singleton Is true when expr is an integer tuple of of length 1.
is_n_tuple Is true when expr is a tuple of length n.
is_negative_integer Is true when expr equals a negative integer.
is_nonnegative_integer Is true when expr equals a nonnegative integer.
is_nonnegative_integer_equivalent_number Is true when expr is a nonnegative integer-equivalent number.
is_nonnegative_integer_power_of_two Is true when expr is a nonnegative integer power of 2.
is_null_tuple Is true when expr is a tuple of length 0.
is_pair Is true when expr is a tuple of length 2.
is_positive_integer Is true when expr equals a positive integer.
is_positive_integer_equivalent_number Is true when expr is a positive integer-equivalent number.
is_positive_integer_power_of_two Is true when expr is a positive integer power of 2.
is_singleton Is true when expr is a tuple of length 1.
least_common_multiple Least common multiple of positive integers.
least_multiple_greater_equal Returns the least integer multiple of m greater than or equal to n.
least_power_of_two_greater_equal Returns least integer power of two greater than or equal to positive n.
next_integer_partition Next integer partition following integer_partition in descending lex order.
partition_integer_by_ratio Partitions positive integer-equivalent n by ratio.
partition_integer_into_canonic_parts Partitions integer n into canonic parts.
partition_integer_into_halves Writes positive integer n as the pair t = (left, right) such that n == left + right.
partition_integer_into_parts_less_than_double Partitions integer n into parts less than double integer m.
partition_integer_into_units Partitions positive integer into units:
remove_powers_of_two Removes powers of 2 from the factors of positive integer n:
sign Returns -1 on negative n:
weight Sum of the absolute value of the elements in sequence:
yield_all_compositions_of_integer Yields all compositions of positive integer n
yield_all_partitions_of_integer Yields all partitions of positive integer n in descending lex order:
yield_nonreduced_fractions Yields positive nonreduced fractions in Cantor diagonalized order: