Class TableDefinedFunctionSimple<X,Y>

java.lang.Object
net.simplace.sim.components.util.helper.TableDefinedFunctionSimple<X,Y>
All Implemented Interfaces:
Function<X,Y>
Direct Known Subclasses:
TableDefinedFunction

public class TableDefinedFunctionSimple<X,Y> extends Object implements Function<X,Y>
  • Field Details

    • xTableValues

      protected X[] xTableValues
    • yTableValues

      protected Y[] yTableValues
    • y

      protected Y y
    • iLast

      protected int iLast
    • isCaching

      protected boolean isCaching
    • isExtrapolating

      protected boolean isExtrapolating
    • isConstant

      protected boolean isConstant
    • scaleFactor

      protected Double scaleFactor
    • interpolMethod

    • xrounding

      protected Function<Double,Integer> xrounding
    • yrounding

      protected Function<Double,Integer> yrounding
  • Constructor Details

    • TableDefinedFunctionSimple

      public TableDefinedFunctionSimple(X[] xtable, Y[] ytable)
    • TableDefinedFunctionSimple

      public TableDefinedFunctionSimple(X[] xtable, Y[] ytable, boolean caching)
    • TableDefinedFunctionSimple

      public TableDefinedFunctionSimple(X[] xtable, Y[] ytable, boolean caching, boolean extrapolating)
    • TableDefinedFunctionSimple

      public TableDefinedFunctionSimple(X[] xtable, Y[] ytable, boolean caching, boolean extrapolating, TableDefinedFunctionSimple.InterpolationMethod method)
    • TableDefinedFunctionSimple

      public TableDefinedFunctionSimple(X[] xtable, Y[] ytable, boolean caching, boolean extrapolating, TableDefinedFunctionSimple.InterpolationMethod method, double factor)
  • Method Details

    • getIndexOrdered

      protected int getIndexOrdered(Number s)
    • isInRange

      protected boolean isInRange(Number s)
    • getExtrapolatedValueAt

      protected Y getExtrapolatedValueAt(Number s)
    • getLookupValueAt

      protected Y getLookupValueAt(X s)
    • getConstantValueAt

      protected Y getConstantValueAt(Number s)
    • getInterpolatedValueAt

      protected Double getInterpolatedValueAt(Number s)
    • getValueAt

      public Y getValueAt(X x)
    • apply

      public Y apply(X x)
      Specified by:
      apply in interface Function<X,Y>