public interface IFunction
extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
int |
addSupportPoint(float x,
float y)
Add a new SupportPoint at the given position.
|
IFunction |
copy() |
float |
getDefinitionRange()
The definition range (minX to maxX) of all SupportPoints
|
float |
getMaxX() |
float |
getMaxY() |
float |
getMinX() |
float |
getMinY() |
java.lang.String |
getName()
Returns the name of the function
|
float |
getStiffness() |
ISupportPoint |
getSupportPoint(int index)
Retrieve the SupportPoint at the given index
|
java.util.List<ISupportPoint> |
getSupportPointsInArea(float minX,
float maxX,
float minY,
float maxY)
Get the SupportPoints of this function in the given area.
|
int |
getSupportPointSize() |
boolean |
hasSupportPointsInArea(float minX,
float maxX,
float minY,
float maxY)
Check it this function has at least one SupportPoints in the given area.
|
int |
indexOf(ISupportPoint supportPoint)
Retrieve the index of the given SupportPoint.
|
void |
mirrorYFunction()
Mirror function so that all support points get negated y coordinates.
|
void |
moveFunction(float xShift,
float yShift)
Move function in space.
|
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
moveSupportPoint(int index,
float xMove,
float yMove) |
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
moveSupportPoint(ISupportPoint point,
float xMove,
float yMove) |
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
moveSupportPointTo(int index,
float x,
float y) |
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
moveSupportPointTo(ISupportPoint point,
float x,
float y) |
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) |
ISupportPoint |
removeSupportPoint(int index)
Remove the SupportPoint at the given index if possible.
|
void |
rescaleXRange(float start,
float end,
float newEnd)
Re-scale a given area of the function.
|
java.lang.String |
toCSVString()
Returns a String with comma separated values of this function to be used
e.g. for file writing
|
double |
value(double x)
Returns the function value at the passed x coordinate.
|
java.lang.String getName()
double value(double x)
x
- the coordinate at which to return the functions valuejava.lang.String toCSVString()
float getStiffness()
float getMaxX()
float getMinX()
float getMaxY()
float getMinY()
float getDefinitionRange()
boolean hasSupportPointsInArea(float minX, float maxX, float minY, float maxY)
minX
- - the lower x boundmaxX
- - the upper x boundminY
- - the lower y boundmaxY
- - the upper y boundjava.util.List<ISupportPoint> getSupportPointsInArea(float minX, float maxX, float minY, float maxY)
minX
- - the lower x boundmaxX
- - the upper x boundminY
- - the lower y boundmaxY
- - the upper y boundIFunction copy()
int getSupportPointSize()
int indexOf(ISupportPoint supportPoint)
supportPoint
- - the SupportPointISupportPoint getSupportPoint(int index)
index
- - the index of the SupportPointvoid moveFunction(float xShift, float yShift)
xShift
- - the shift in x directionyShift
- - the shift in y directionvoid mirrorYFunction()
void rescaleXRange(float start, float end, float newEnd)
start
- - the start of the rangeend
- - the end of the rangenewEnd
- - the new end of the rangeorg.apache.commons.math3.geometry.euclidean.twod.Vector2D moveSupportPoint(ISupportPoint point, float xMove, float yMove)
point
- - the SupportPoint to movex
- - the shift in the x coordinate of the SupportPointy
- - the shift in the y coordinate of the SupportPointorg.apache.commons.math3.geometry.euclidean.twod.Vector2D moveSupportPoint(int index, float xMove, float yMove)
index
- - the index of the SupportPoint to movex
- - the shift in the x coordinate of the SupportPointy
- - the shift in the y coordinate of the SupportPointorg.apache.commons.math3.geometry.euclidean.twod.Vector2D moveSupportPointTo(ISupportPoint point, float x, float y)
point
- - the SupportPoint to movex
- - the new x coordinate of the SupportPointy
- - the new y coordinate of the SupportPointorg.apache.commons.math3.geometry.euclidean.twod.Vector2D moveSupportPointTo(int index, float x, float y)
index
- - the index of the SupportPoint to movex
- - the new x coordinate of the SupportPointy
- - the new y coordinate of the SupportPointorg.apache.commons.math3.geometry.euclidean.twod.Vector2D moveTangentPointBeforeTo(int index, float x, float y)
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 beforeorg.apache.commons.math3.geometry.euclidean.twod.Vector2D moveTangentPointAfterTo(int index, float x, float y)
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 afterint addSupportPoint(float x, float y)
x
- - the x coordinate of the new SupportPointy
- - the y coordinate of the new SupportPointISupportPoint removeSupportPoint(int index)
index
- - the index of the SupportPoint to remove