net.simplace.sim.components.util.helper.TabulatedValues
Handles tabulated values (X and Y column) and returns for a x-value
a y-value by using the table (lookup, interpolation etc.)
public class TabulatedValues {
// Public Constructors
public TabulatedValues(FWSimVariable tx, FWSimVariable ty);
// Public Instance Methods public Object
getValueAt(Object x);
Returns for a value x a coresponding value y by using tabulated data.
If X and Y columns are numeric, then y is interpolated (or extrapolated).
If Y column is integer, then the interpolated value is rounded to integer too.
If X column is numeric and Y column a String, then y is taken from
the first row where x is equal or greater than the X-column value.
If X column is a String, then a lookup is performed by returning the
y value from the row where x is found. If x is not found, then null is
returned.
returns y-value coresponding to x-value
// Protected Instance Methods protected Object calcValue(String x, String[] xv, Object[] yv);
protected String calcValue(Number x, Number[] xv, String[] yv);
protected Integer calcValue(Integer x, Integer[] xv, Integer[] yv);
protected Double calcValue(Integer x, Integer[] xv, Double[] yv);
protected Integer calcValue(Double x, Double[] xv, Integer[] yv);
protected Double calcValue(Double x, Double[] xv, Double[] yv);
}