Class Sub

java.lang.Object
org.opt4j.operator.algebra.Sub
All Implemented Interfaces:
Term

public class Sub extends Object implements Term
The Sub term subtracts two Terms.
  • Field Details

    • minuend

      protected final Term minuend
    • subtrahend

      protected final Term subtrahend
  • Constructor Details

    • Sub

      public Sub(Term minuend, Term subtrahend)
      Constructs a Sub term.
      Parameters:
      minuend - the minuend
      subtrahend - the subtrahend
  • Method Details

    • calculate

      public double calculate(double... values)
      Description copied from interface: Term
      Calculates the result of this Term.
      Specified by:
      calculate in interface Term
      Parameters:
      values - the values
      Returns:
      the result