Interface Monoid<E>

All Superinterfaces:
Magma<E>, Set<E>
All Known Subinterfaces:
AbelianGroup<E>, AbelianMonoid<E>, Algebra<E,F>, BanachAlgebra<E,F>, BanachSpace<E,S>, CStarAlgebra<E,F>, DivisionRing<E>, Field<E>, FiniteGroup<E>, GradedAlgebra<E,F>, Group<E>, HilbertSpace<E,S>, KleeneAlgebra<E>, LieAlgebra<E,S>, Matrix<E>, Module<M,R>, NonAssociativeAlgebra<E,S>, OrderedGroup<E>, Ring<E>, Semiring<E>, Vector<E>, VectorSpace<V,F>
All Known Implementing Classes:
Boolean, BooleanAlgebra, Booleans, CliffordAlgebra, Complex, Complexes, CyclicGroup, DenseMatrix, DenseVector, DihedralGroup, DoubleField, FreeGroup, GenericMatrix, GenericVector, Integer, Integers, LieGroup, MatrixLieAlgebra, MMapMatrix, NativeRealBig, NativeRealDoubleMatrix, NativeRealDoubleVector, NativeRealFloatMatrix, Natural, Naturals, Octonion, Octonions, PolynomialRing, Quaternion, QuaternionGroup, Quaternions, Rational, Rationals, Real, RealBig, RealDouble, RealDoubleMatrix, RealDoubleVector, RealFloat, RealFloatVector, Reals, SIMDRealDoubleMatrix, SIMDRealFloatMatrix, SO3_1Group, SparseMatrix, SparseVector, SquareMatrices, SU2Group, SU3Group, SymmetricGroup, TiledMatrix, U1Group, Vector2D, Vector3D, Vector4D, VectorND, VectorSpace2D, VectorSpace3D

public interface Monoid<E> extends Magma<E>
A monoid is a semigroup with an identity element.

A monoid (M, ∗, e) satisfies:

  • Closure: ∀ a, b ∈ M: a ∗ b ∈ M
  • Associativity: (a ∗ b) ∗ c = a ∗ (b ∗ c)
  • Identity: ∃ e ∈ M: a ∗ e = e ∗ a = a

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • identity

      E identity()
      Returns the identity element of this monoid.

      Satisfies: e ∗ a = a ∗ e = a for all a.

      Returns:
      the identity element
    • isAssociative

      default boolean isAssociative()
      Monoids are associative by definition.
      Specified by:
      isAssociative in interface Magma<E>
      Returns:
      always true
      See Also:
      • invalid reference
        Semigroup