public class LookupTableImpl extends java.lang.Object implements ILookupTable
ILookupTable.Type| Constructor and Description |
|---|
LookupTableImpl(ILookupTable.Type type)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPoint(Point p)
Add a data point
|
double |
closestPointLeft(double x0)
find closest point left to x
|
double |
closestPointRight(double x0)
find closest point right to x
|
double |
getDydx(double x)
Get dy/dx
|
double[] |
getMax(double startX)
starting from the point x, find [x, y] such that f(x) = max
|
double |
getY(double x)
Get y = f(x)
|
void |
setData(double[] xAry,
double[] yAry)
Set data points, assuming xAry and yAry have the same dimension
|
void |
setData(java.util.List<Vector_xy> list)
Constructor.
|
void |
setData(java.util.List<Vector_xy> list,
boolean inverse)
Constructor.
|
java.lang.String |
toString() |
public LookupTableImpl(ILookupTable.Type type)
type - LookupTable type (TypeLinearLine, TypeSplineCurve)public void addPoint(Point p) throws InterpssException
addPoint in interface ILookupTablep - data point (x, y)InterpssExceptionpublic void setData(double[] xAry,
double[] yAry)
throws InterpssException
setData in interface ILookupTablexAry - yAry - InterpssExceptionpublic void setData(java.util.List<Vector_xy> list) throws InterpssException
setData in interface ILookupTablelist - InterpssExceptionpublic void setData(java.util.List<Vector_xy> list, boolean inverse) throws InterpssException
setData in interface ILookupTablelist - inverse - InterpssExceptionpublic double getY(double x)
throws InterpssException
getY in interface ILookupTablex - x valueInterpssExceptionpublic double getDydx(double x)
throws InterpssException
getDydx in interface ILookupTablex - x valueInterpssExceptionpublic double[] getMax(double startX)
throws InterpssException
getMax in interface ILookupTablestartX - the start point for searchInterpssExceptionpublic double closestPointLeft(double x0)
x - public double closestPointRight(double x0)
x - public java.lang.String toString()
toString in class java.lang.Object