Interface AbelianMonoid<E>
- All Known Subinterfaces:
AbelianGroup<E>, Algebra<E,F>, BanachAlgebra<E, F>, BanachSpace<E, S>, CStarAlgebra<E, F>, DivisionRing<E>, Field<E>, GradedAlgebra<E, F>, HilbertSpace<E, S>, KleeneAlgebra<E>, LieAlgebra<E, S>, Matrix<E>, Module<M, R>, NonAssociativeAlgebra<E, S>, Ring<E>, Semiring<E>, Vector<E>, VectorSpace<V, F>
- All Known Implementing Classes:
Boolean, BooleanAlgebra, Booleans, CliffordAlgebra, Complex, Complexes, DenseMatrix, DenseVector, DoubleField, GenericMatrix, GenericVector, Integer, Integers, MatrixLieAlgebra, MMapMatrix, NativeRealBig, NativeRealDoubleMatrix, NativeRealDoubleVector, NativeRealFloatMatrix, Natural, Naturals, Octonion, Octonions, PolynomialRing, Quaternion, Quaternions, Rational, Rationals, Real, RealBig, RealDouble, RealDoubleMatrix, RealDoubleVector, RealFloat, RealFloatVector, Reals, SIMDRealDoubleMatrix, SIMDRealFloatMatrix, SparseMatrix, SparseVector, SquareMatrices, TiledMatrix, Vector2D, Vector3D, Vector4D, VectorND, VectorSpace2D, VectorSpace3D
An abelian monoid is a commutative monoid.
It satisfies all monoid axioms plus commutativity: a ∗ b = b ∗ a.
Convention: Abelian monoids often use additive notation (+, 0).
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptiondefault EReturns the sum of two elements (additive notation).default Eidentity()Default implementation of identity that delegates to zero().default booleanAbelian monoids are commutative by definition.default Ezero()Returns the additive identity (zero element).Methods inherited from interface Monoid
isAssociativeMethods inherited from interface Set
contains, description, isEmpty
-
Method Details
-
add
Returns the sum of two elements (additive notation).Delegates to
Magma.operate(Object, Object).- Parameters:
a- the first addendb- the second addend- Returns:
- a + b
-
zero
Returns the additive identity (zero element).Delegates to
identity().- Returns:
- the zero element
-
isCommutative
default boolean isCommutative()Abelian monoids are commutative by definition.- Specified by:
isCommutativein interfaceMagma<E>- Returns:
- always
true
-
identity
-