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 ILookupTable
p
- data point (x, y)InterpssException
public void setData(double[] xAry, double[] yAry) throws InterpssException
setData
in interface ILookupTable
xAry
- yAry
- InterpssException
public void setData(java.util.List<Vector_xy> list) throws InterpssException
setData
in interface ILookupTable
list
- InterpssException
public void setData(java.util.List<Vector_xy> list, boolean inverse) throws InterpssException
setData
in interface ILookupTable
list
- inverse
- InterpssException
public double getY(double x) throws InterpssException
getY
in interface ILookupTable
x
- x valueInterpssException
public double getDydx(double x) throws InterpssException
getDydx
in interface ILookupTable
x
- x valueInterpssException
public double[] getMax(double startX) throws InterpssException
getMax
in interface ILookupTable
startX
- the start point for searchInterpssException
public double closestPointLeft(double x0)
x
- public double closestPointRight(double x0)
x
- public java.lang.String toString()
toString
in class java.lang.Object