Crate abstalg

Source

Structs§

AdditiveGroup
The additive group reduct of rings and vector spaces.
ApproxFloats
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.
CheckedInts
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.
CheckedUints
The set of natural numbers whose elements are stored in a primitive unsigned integer type. This structure is functionally equivalent to the set of all natural numbers, 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 upper bounded.
DivisibilityOrder
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.
Integers
The set of integers whose elements are BigInt objects. The ring operations are the normal ones. The lattice order is the normal total order.
MatrixRing
The ring of rectangular matrices of a fixed size over a field. The matrices are plain vectors of field elements.
MultiplicativeGroup
The multiplicative group of a unitary ring or field, or more generally the group of invertible elements of any monoid.
Naturals
The set of natural numbers (including zero) whose elements are BigUint objects. The semilattice and commutative semilattice operations are the normal ones while the lattice order is the normal total order.
Permutations
PolynomialAlgebra
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.
QuotientField
A quotient field of an Euclidean domain by a principal ideal generated by an irreducible (prime) element.
QuotientRing
A quotient ring of an Euclidean domain by a principal ideal.
ReducedFractions
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.
TwoElementAlgebra
VectorAlgebra
The direct power of the given algebra where the elements are fixed sized vectors. The algebraic operations are always acting coordinate-wise.

Constants§

BB
The two-element boolean algebra and field with bool elements.
F32
The field of reals approximated by machine f32 values.
F64
The field of reals approximated by machine f64 values.
GF2
The 2-element field represented as residue classes of integers modulo 2.
GF3
The 3-element field represented as residue classes of integers modulo 3.
I8
The Euclidean ring of integers with i8 primitive values and checked operations.
I16
The Euclidean ring of integers with i16 primitive values and checked operations.
I32
The Euclidean ring of integers with i32 primitive values and checked operations.
I64
The Euclidean ring of integers with i64 primitive values and checked operations.
NN
The commutative monoid of natural numbers (including zero) with arbitrary large values.
QQ
The field of rational numbers with arbitrary large values.
U8
The semiring of natural numbers with u8 primitive values and checked operations.
U16
The semiring of natural numbers with u16 primitive values and checked operations.
U32
The semiring of natural numbers with u32 primitive values and checked operations.
U64
The semiring of natural numbers with u64 primitive values and checked operations.
ZZ
The Euclidean ring of integers with arbitrary large values.

Traits§

AbelianGroup
A commutative group written in additive notation. Typical examples are the additive structures of rings, fields and vector spaces.
BooleanAlgebra
A Boolean algebra, which is a complemented bounded distributive lattice. Typical examples are the two-element boolean algebra and the power sets.
BoundedOrder
A partial order that has a largest and smallest element. Typical examples are bounded lattices.
CommuntativeMonoid
An arbitrary commutative (additive) monoid. A typical example is the set of natural numbers including zero with addition.
DistributiveLattice
A lattice that is distributive. No new methods are added.
Domain
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 ==.
EuclideanDomain
An Euclidean domain is an integral domain where the Euclidean algorithm can be implemented. Typical examples are the rings of integers and polynomials.
Field
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.
Group
An arbitrary (multiplicative) group, which is a monoid where every element has an inverse. Typical examples are the multiplicative and additive group of rings.
IntegralDomain
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.
Lattice
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.
Monoid
An arbitrary multiplicative monoid, which is a semigroup with an identity element. Typical examples are the multiplicative monoid of unitary rings.
PartialOrder
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).
SemiRing
A (not necessarily commutative) semiring. Typical examples are the set of natural numbers.
Semigroup
An arbitrary (multiplicative) semigroup, which is set with an associative binary operation.
UnitaryRing
A ring with an identity element (not necessarily commutative). Typical examples are the rings of rectangular matrices, integers and polynomials.