Class Index

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

public class Index extends Object implements Term
The Index returns the i-th value of the values array of the calculate(double...) method.
  • Field Details

    • i

      protected final int i
  • Constructor Details

    • Index

      public Index(int i)
      Constructs an Index.
      Parameters:
      i - the array index
  • 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