Class Var

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

public class Var extends Object implements Term
The Var returns a double value.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Var()
    Constructs a Var with the initial value 0.
    Var(double value)
    Constructs a Var with a given value.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    calculate(double... values)
    Calculates the result of this Term.
    double
    Returns the value.
    void
    setValue(double value)
    Sets the value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • value

      protected double value
  • Constructor Details

    • Var

      public Var()
      Constructs a Var with the initial value 0.
    • Var

      public Var(double value)
      Constructs a Var with a given value.
      Parameters:
      value - the value
  • Method Details

    • getValue

      public double getValue()
      Returns the value.
      Returns:
      the value
    • setValue

      public void setValue(double value)
      Sets the value.
      Parameters:
      value - the value to set
    • 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