public class PiecewiseLinearFunction extends SupportPointFunction
SupportPointFunction.SupportPointComperator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LINEAR_NAME
name identifying a this kind of function
|
Constructor and Description |
---|
PiecewiseLinearFunction()
Default Constructor.
|
PiecewiseLinearFunction(java.util.ArrayList<SupportPoint> points,
float stiffness)
Instantiates a new PiecewiseLinearFunction object
|
Modifier and Type | Method and Description |
---|---|
IFunction |
copy() |
java.lang.String |
getName()
Returns the name of the function
|
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
moveTangentPointAfterTo(int index,
float x,
float y) |
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
moveTangentPointBeforeTo(int index,
float x,
float y) |
double |
value(double t)
Returns the sin value at the passed x coordinate.
|
addSupportPoint, getDefinitionRange, getMaxX, getMaxY, getMinX, getMinY, getStiffness, getSupportPoint, getSupportPointsInArea, getSupportPointSize, hasSupportPointInArea, hasSupportPointsInArea, indexOf, initialize, mirrorYFunction, moveFunction, moveSupportPoint, moveSupportPoint, moveSupportPointTo, moveSupportPointTo, removeSupportPoint, rescaleXRange, toCSVString
public static final java.lang.String LINEAR_NAME
public PiecewiseLinearFunction()
public PiecewiseLinearFunction(java.util.ArrayList<SupportPoint> points, float stiffness)
public java.lang.String getName()
IFunction
public double value(double t)
t
- the coordinate at which to return the functions valuepublic IFunction copy()
IFunction.copy()
public org.apache.commons.math3.geometry.euclidean.twod.Vector2D moveTangentPointBeforeTo(int index, float x, float y)
moveTangentPointBeforeTo
in interface IFunction
moveTangentPointBeforeTo
in class SupportPointFunction
index
- - the index of the SupportPoint which tangent point before
should be movedx
- - the new x coordinate of the SupportPoint tangent point beforey
- - the new y coordinate of the SupportPoint tangent point beforepublic org.apache.commons.math3.geometry.euclidean.twod.Vector2D moveTangentPointAfterTo(int index, float x, float y)
moveTangentPointAfterTo
in interface IFunction
moveTangentPointAfterTo
in class SupportPointFunction
index
- - the index of the SupportPoint which tangent point after
should be movedx
- - the new x coordinate of the SupportPoint tangent point aftery
- - the new y coordinate of the SupportPoint tangent point after