Structs

The additive group reduct of rings and vector spaces.

The field of real numbers approximated by a primitive floating point number. NaN and infinity values are not considered as members, so all operations resulting one of these will panic. The lattice order is the normal total order, which is not bounded.

The set of integers whose elements are stored in a primitive signed integer type. This structure is functionally equivalent to the set of all integers, but some operations are going to panic if the mathematical result cannot be represented in the primitive type. The lattice order is the normal total order, which is not bounded.

The divisibility partial order of an integral domain where the elements are the unique representatives of associate classes, the largest element is zero, the smallest element is one. If the domain is Euclidean, this is a bounded distributive lattice where the meet is the greatest common divisor, the join is the least common multiple.

The set of integers whose elements are BigInt objects. The ring operations are the normal ones. The lattice order is the normal total order.

The ring of rectangular matrices of a fixed size over a field. The matrices are plain vectors of field elements.

The multiplicative group of a unitary ring or field, or more generally the group of invertible elements of any monoid.

The ring of polynomials over a base ring or field where each element is represented as a vector whose last element, the leading coefficient (if any) must be non-zero. This means that the empty vector is the zero element, and every polynomial has a unique representation. Polynomials can be defined over any abelian group, though only the group operations will be available.

A quotient field of an Euclidean domain by a principal ideal generated by an irreducible (prime) element.

A quotient ring of an Euclidean domain by a principal ideal.

The field of fractions over the elements of an Euclidean domain. The elements are ratios where the numerator and denominator are relative primes and the denominator is normalized with respect to its associate class.

The direct power of the given algebra where the elements are fixed sized vectors. The algebraic operations are always acting coordinate-wise.

Constants

The two-element boolean algebra and field with bool elements.

The field of reals approximated by machine f32 values.

The field of reals approximated by machine f64 values.

The 2-element field represented as residue classes of integers modulo 2.

The 3-element field represented as residue classes of integers modulo 3.

The Euclidean ring of integers with i8 primitive values and checked operations.

The Euclidean ring of integers with i16 primitive values and checked operations.

The Euclidean ring of integers with i32 primitive values and checked operations.

The Euclidean ring of integers with i64 primitive values and checked operations.

The field of rational numbers with arbitrary large values.

The Euclidean ring of integers with arbitrary large values.

Traits

A commutative group written in additive notation. Typical examples are the additive structures of rings, fields and vector spaces.

A Boolean algebra, which is a complemented bounded distributive lattice. Typical examples are the two-element boolean algebra and the power sets.

A partial order that has a largest and smallest element. Typical examples are bounded lattices.

A lattice that is distributive. No new methods are added.

An arbitrary set of elements where not all representable objects are members of the set. The same element can be represented by different objects, thus the equals method shall be used in place of ==.

An Euclidean domain is an integral domain where the Euclidean algorithm can be implemented. Typical examples are the rings of integers and polynomials.

A field is a commutative ring with identity where each non-zero element has a multiplicative inverse. Typical examples are the real, complex and rational numbers, and finite fields constructed from an Euclidean domain and one of its irreducible elements. All fields are Euclidean domains themselves, with a rather trivial structure.

An arbitrary (multiplicative) group, which is a monoid where every element has an inverse. Typical examples are the multiplicative and additive group of rings.

An integral domain is a commutative unitary ring in which the product of non-zero elements are non-zero. This trait not add any new operations, just marks the properties of the ring. A typical examples are the integers, and the ring of polynomials with integer coefficients, which is not an Euclidean domain.

A set where the join and meet of elements can be calculated. Typical examples are the total orders of integers or the divisibility relation on the associate classes of an Euclidean domain.

An arbitrary (multiplicative) monoid, which is a semigroup with an identity element. Typical examples are the multiplicative monoid of unitary rings.

A set with a reflexive, transitive and antisymmetric relation. Typical examples are the lattices and the divisibility relation of integral domains (which might not be a lattice).

An arbitrary (multiplicative) semigroup, which is set with an associative binary operation.

A ring with an identity element (not necessarily commutative). Typical examples are the rings of rectangular matrices, integers and polynomials.