Class NTRationalExpression

All Implemented Interfaces:
RationalExpression, NumericExpression, SymbolicExpression, SymbolicObject

public class NTRationalExpression extends HomogeneousExpression<Monomial> implements RationalExpression
A nontrivial RationalExpression. It consists of a numerator and denominator, both Monomials. The denominator is not 1 or 0, the numerator is not 0, and the numerator does not equal the denominator.
  • Method Details

    • numerator

      public Monomial numerator(IdealFactory factory)
      Description copied from interface: RationalExpression
      Returns the numerator of this rational expression
      Specified by:
      numerator in interface RationalExpression
      Parameters:
      factory - the ideal factory responsible for this expression
      Returns:
      the numerator of this rational expression
    • numerator

      public Monomial numerator()
      Returns the numerator of this rational expression.
      Returns:
      the numerator
    • denominator

      public Monomial denominator(IdealFactory factory)
      Description copied from interface: RationalExpression
      Returns the denominator of this rational expression.
      Specified by:
      denominator in interface RationalExpression
      Parameters:
      factory - the ideal factory responsible for this expression
      Returns:
      the denominator of this rational expression
    • denominator

      public Monomial denominator()
      Returns the denominator of this rational expression.
      Returns:
      the denominator
    • powerRational

      public RationalExpression powerRational(IdealFactory factory, RationalExpression exponent)
      Description copied from interface: RationalExpression

      Computes an expression equivalent to raising this expression to the exponent power.

      Preconditions:

      • if the monomial constant of the numerator of exponent is an integer (including a real integer), it is 1
      • if this has integer type then exponent has integer type

      Specified by:
      powerRational in interface RationalExpression
      Parameters:
      factory - the ideal factory responsible for this expression
      exponent - the power to which this expression should be raised
      Returns:
      an expression equivalent to raising this expression to the exponent power
    • powerInt

      public RationalExpression powerInt(IdealFactory factory, IntegerNumber exponent)
      Description copied from interface: RationalExpression
      Computes an expression equivalent to raising this expression to the exponent power. In this case the exponent is an IntegerNumber.
      Specified by:
      powerInt in interface RationalExpression
      Parameters:
      factory - the ideal factory responsible for this expression
      exponent - the power to which this expression should be raised, must be positive
      Returns:
      an expression equivalent to raising this expression to the exponent power