Interface SemiRing<E>

Type Parameters:
E - Element type.
All Superinterfaces:
CommutativeMonoid<E>, Monoid<E>, Semigroup<E>, Set<E>
All Known Subinterfaces:
EuclideanDomain<E>, Field<E>, Ring<E>
All Known Implementing Classes:
AlgebraicFieldExtension, BigElements, BigFiniteField, BigIntegers, BigIntegersModuloN, BigPrimeField, BigRationals, ComplexNumbers, ConstructiveReals, FieldOfFractions, FiniteField, GaussianRationals, Integers, IntegersModuloN, MatrixRing, MultivariatePolynomialRing, MultivariatePolynomialRingOverRing, NullSafeRing, PerformanceLoggingField, PerformanceLoggingRing, PolynomialRing, PolynomialRingFFT, PolynomialRingKaratsuba, PolynomialRingOverRing, PrimeField, QuadraticField, QuotientRing, Rationals, RealNumbers, TestUtils.TestBigIntegers, TestUtils.TestField, TestUtils.TestIntegers

public interface SemiRing<E> extends Monoid<E>, CommutativeMonoid<E>
A semiring is a set with an associative and commutative addition operation and an associative multiplication operation. It is not required that each element has an additive inverse.
  • Method Summary

    Modifier and Type
    Method
    Description
    default E
    integer(int a)
    Return the element in this ring equal to 1 + ⋯ + 1 where 1 is added to it self a times.
    default E
    multiply(int a, E b)
    Return the element in this ring equal to ab.
    default E
    multiply(int a, E b, E c)
    Return the element in this ring equal to abc.

    Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.CommutativeMonoid

    add, add, add, zero

    Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Monoid

    identity, isIdentity, power

    Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Semigroup

    multiply, multiply, multiply

    Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Set

    equals, toString
  • Method Details

    • integer

      default E integer(int a)
      Return the element in this ring equal to 1 + ⋯ + 1 where 1 is added to it self a times. If this is a ring, a are allowed to be negative, in which case it is equal to the additive inverse of 1 is added to it self -a times
    • multiply

      default E multiply(int a, E b)
      Return the element in this ring equal to ab.
    • multiply

      default E multiply(int a, E b, E c)
      Return the element in this ring equal to abc.