Class ExponentialTerm

java.lang.Object
org.oristool.math.expression.ExponentialTerm
All Implemented Interfaces:
AtomicTerm

public final class ExponentialTerm extends Object implements AtomicTerm
An atomic term of the form exp(-lambda * x).
  • Constructor Details

    • ExponentialTerm

      public ExponentialTerm(Variable variable, BigDecimal lambda)
      Builds an instance for a given variable and rate.
      Parameters:
      variable - variable of the exponential term
      lambda - rate (before the negation)
  • Method Details

    • getVariable

      public Variable getVariable()
      Description copied from interface: AtomicTerm
      Returns the variable associated with the atomic term.
      Specified by:
      getVariable in interface AtomicTerm
      Returns:
      the associated variable
    • setVariable

      public void setVariable(Variable variable)
    • getLambda

      public BigDecimal getLambda()
    • setLambda

      public void setLambda(BigDecimal lambda)
    • multiply

      public void multiply(AtomicTerm term)
      Description copied from interface: AtomicTerm
      Multiplies with another term.
      Specified by:
      multiply in interface AtomicTerm
      Parameters:
      term - to be multiplied
    • duplicate

      public AtomicTerm duplicate()
      Description copied from interface: AtomicTerm
      Duplicates an atomic term.
      Specified by:
      duplicate in interface AtomicTerm
      Returns:
      a copy of this term
    • isOne

      public boolean isOne()
      Description copied from interface: AtomicTerm
      Checks if this term the constant 1.
      Specified by:
      isOne in interface AtomicTerm
      Returns:
      true if the term is one, false otherwise
    • evaluate

      public OmegaBigDecimal evaluate(OmegaBigDecimal value)
      Description copied from interface: AtomicTerm
      Evaluates the atomic term substituting value to its variable.
      Specified by:
      evaluate in interface AtomicTerm
      Parameters:
      value - the value to be substituted to x
      Returns:
      the result of the evaluation
    • substitute

      public void substitute(Variable oldVar, Variable newVar)
      Description copied from interface: AtomicTerm
      Substitutes oldVar with newVar in the atomic term.
      Specified by:
      substitute in interface AtomicTerm
      Parameters:
      oldVar - variable to be substituted
      newVar - new variable
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object