pub trait AssociativeAlgebra<R: Ring>: Algebra<R> + AssociativeRing { }Expand description
A marker trait for an Associative Algebra.
This trait identifies an Algebra where the multiplication operation is
associative. Since the AssociativeRing trait (required by this trait’s
mathematical definition and implied by the explicit Associative marker
trait for implementors) guarantees associativity of multiplication,
this trait explicitly signals that property.
It is distinct from non-associative algebras like Octonions.
§Mathematical Definition
An associative algebra A is an algebra that is also an AssociativeRing.
This means it satisfies the law:
(x * y) * z = x * (y * z) for all x, y, z in A.
§Examples
- Associative: Real numbers, Complex numbers, Quaternions.
- Non-Associative: Octonions.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.