Interface AtomicTerm

All Known Implementing Classes:
ExponentialTerm, MonomialTerm

public interface AtomicTerm
A generic atomic term (exponential or monomial).
  • Method Details

    • multiply

      void multiply(AtomicTerm term)
      Multiplies with another term.
      Parameters:
      term - to be multiplied
    • duplicate

      AtomicTerm duplicate()
      Duplicates an atomic term.
      Returns:
      a copy of this term
    • isOne

      boolean isOne()
      Checks if this term the constant 1.
      Returns:
      true if the term is one, false otherwise
    • evaluate

      Evaluates the atomic term substituting value to its variable.
      Parameters:
      value - the value to be substituted to x
      Returns:
      the result of the evaluation
    • substitute

      void substitute(Variable oldVar, Variable newVar)
      Substitutes oldVar with newVar in the atomic term.
      Parameters:
      oldVar - variable to be substituted
      newVar - new variable
    • getVariable

      Variable getVariable()
      Returns the variable associated with the atomic term.
      Returns:
      the associated variable