Interface MonoidElem<C extends MonoidElem<C>>

Type Parameters:
C - element type
All Superinterfaces:
Comparable<C>, Element<C>, Serializable
All Known Subinterfaces:
AlgebraElem<A,C>, FieldElem<C>, GcdRingElem<C>, NoncomRingElem<C>, Polynomial<C>, RegularRingElem<C>, RingElem<C>, StarRingElem<C>
All Known Implementing Classes:
AlgebraicNumber, BigComplex, BigDecimal, BigDecimalComplex, BigInteger, BigOctonion, BigQuaternion, BigQuaternionInteger, BigRational, Complex, ComplexAlgebraicNumber, GenExteriorPolynomial, GenMatrix, GenPolynomial, GenSolvablePolynomial, GenWordPolynomial, IndexList, Local, Local, LocalSolvablePolynomial, ModInt, ModInteger, ModLong, MultiVarPowerSeries, Product, QLRSolvablePolynomial, Quotient, Quotient, QuotSolvablePolynomial, RealAlgebraicNumber, RealAlgebraicNumber, RecSolvablePolynomial, RecSolvableWordPolynomial, Residue, Residue, ResidueSolvablePolynomial, ResidueSolvableWordPolynomial, SolvableLocal, SolvableLocalResidue, SolvableQuotient, SolvableResidue, UnivPowerSeries, Word, WordResidue

public interface MonoidElem<C extends MonoidElem<C>> extends Element<C>
Monoid element interface. Defines the multiplicative methods.
  • Method Details

    • isONE

      boolean isONE()
      Test if this is one.
      Returns:
      true if this is 1, else false.
    • isUnit

      boolean isUnit()
      Test if this is a unit. I.e. there exists x with this.multiply(x).isONE() == true.
      Returns:
      true if this is a unit, else false.
    • multiply

      C multiply(C S)
      Multiply this with S.
      Parameters:
      S -
      Returns:
      this * S.
    • divide

      C divide(C S)
      Divide this by S.
      Parameters:
      S -
      Returns:
      this / S.
    • remainder

      C remainder(C S)
      Remainder after division of this by S.
      Parameters:
      S -
      Returns:
      this - (this / S) * S.
    • quotientRemainder

      default C[] quotientRemainder(C S)
      Quotient and remainder by division of this by S.
      Parameters:
      S -
      Returns:
      [this/S, this - (this/S)*S].
    • rightDivide

      default C rightDivide(C a)
      Right division. Returns commutative divide if not overwritten.
      Parameters:
      a - element.
      Returns:
      right, with a * right = this
    • leftDivide

      default C leftDivide(C a)
      Left division. Returns commutative divide if not overwritten.
      Parameters:
      a - element.
      Returns:
      left, with left * a = this
    • rightRemainder

      default C rightRemainder(C a)
      Right remainder. Returns commutative remainder if not overwritten.
      Parameters:
      a - element.
      Returns:
      r = this - a * (1/right), where a * right = this.
    • leftRemainder

      default C leftRemainder(C a)
      Left remainder. Returns commutative remainder if not overwritten.
      Parameters:
      a - element.
      Returns:
      r = this - (1/left) * a, where left * a = this.
    • twosidedDivide

      default C[] twosidedDivide(C a)
      Two-sided division. Returns commutative divide if not overwritten.
      Parameters:
      a - element.
      Returns:
      [left,right], with left * a * right = this
    • twosidedRemainder

      default C twosidedRemainder(C a)
      Two-sided remainder. Returns commutative remainder if not overwritten.
      Parameters:
      a - element.
      Returns:
      r = this - (a/left) * a * (a/right), where left * a * right = this.
    • inverse

      C inverse()
      Inverse of this. Some implementing classes will throw NotInvertibleException if the element is not invertible.
      Returns:
      x with this * x = 1, if it exists.
    • power

      default C power(long n)
      Power of this to the n-th.
      Parameters:
      n - integer exponent.
      Returns:
      a**n, with a**0 = 1 and a**{-n} = {1/a}**n. Java 8 only