Interface FieldElement<T>

Type Parameters:
T - the type of the field elements
All Known Implementing Classes:
BigFraction, BigReal, Complex, Dfp, DfpDec, Fraction

public interface FieldElement<T>
Interface representing field elements.
Since:
2.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    add(T a)
    Compute this + a.
    divide(T a)
    Compute this ÷ a.
    Get the Field to which the instance belongs.
    Compute this × a.
    Compute this - a.
  • Method Details

    • add

      T add(T a)
      Compute this + a.
      Parameters:
      a - element to add
      Returns:
      a new element representing this + a
    • subtract

      T subtract(T a)
      Compute this - a.
      Parameters:
      a - element to subtract
      Returns:
      a new element representing this - a
    • multiply

      T multiply(T a)
      Compute this × a.
      Parameters:
      a - element to multiply
      Returns:
      a new element representing this × a
    • divide

      T divide(T a) throws ArithmeticException
      Compute this ÷ a.
      Parameters:
      a - element to add
      Returns:
      a new element representing this ÷ a
      Throws:
      ArithmeticException - if a is the zero of the additive operation (i.e. additive identity)
    • getField

      Field<T> getField()
      Get the Field to which the instance belongs.
      Returns:
      Field to which the instance belongs