Interface AdditiveGroup<E>

Type Parameters:
E - Element type.
All Superinterfaces:
CommutativeMonoid<E>, Set<E>
All Known Subinterfaces:
EuclideanDomain<E>, Field<E>, InnerProductSpace<V,S,F>, Module<V,S,R>, NormedVectorSpace<V,S,F>, Ring<E>, VectorSpace<V,S,F>
All Known Implementing Classes:
AbstractModule, AbstractVectorSpace, AlgebraicFieldExtension, BigElements, BigFiniteField, BigIntegers, BigIntegersModuloN, BigPrimeField, BigRationals, ComplexCoordinateSpace, ComplexNumbers, ConstructiveReals, Curve25519, EdwardsCurve, FieldOfFractions, FiniteField, GaussianRationals, Integers, IntegersModuloN, MatrixRing, MontgomeryCurve, MultivariatePolynomialRing, MultivariatePolynomialRingOverRing, NullSafeRing, PerformanceLoggingField, PerformanceLoggingRing, PolynomialRing, PolynomialRingFFT, PolynomialRingKaratsuba, PolynomialRingOverRing, PrimeField, QuadraticField, QuotientRing, Rationals, RealCoordinateSpace, RealNumbers, ShortWeierstrassCurveAffine, ShortWeierstrassCurveProjective, TestUtils.TestBigIntegers, TestUtils.TestField, TestUtils.TestIntegers, VectorGroup, VectorSpaceOverField

public interface AdditiveGroup<E> extends CommutativeMonoid<E>
An additive group is like a Group but where the operation is commutative and is called add.
  • Method Summary

    Modifier and Type
    Method
    Description
    default E
    Return 2e.
    default boolean
    isZero(E a)
     
    negate(E a)
    Return -a.
    default E
    scale(int n, E e)
    Return e added to it self n times in this monoid
    default E
    Return e added to it self n times in this monoid
    default E
    subtract(E a, E b)
    Compute a-b.
    default E
    sum(List<E> terms)
    Returns the sum of a list of elements.

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

    add, add, add, zero

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

    equals, toString
  • Method Details

    • negate

      E negate(E a)
      Return -a.
    • subtract

      default E subtract(E a, E b)
      Compute a-b.
    • isZero

      default boolean isZero(E a)
    • scale

      default E scale(BigInteger n, E e)
      Return e added to it self n times in this monoid
    • scale

      default E scale(int n, E e)
      Return e added to it self n times in this monoid
    • doubling

      default E doubling(E e)
      Return 2e. The default implementation returns e + e but some implementations may override this with faster implementations.
    • sum

      default E sum(List<E> terms)
      Returns the sum of a list of elements.