unikl.disco.math.functions
Interface PWLFunction

All Superinterfaces:
Function
All Known Implementing Classes:
Curve

public interface PWLFunction
extends Function

Interface for piecewise-linear functions.

Author:
Frank A. Zdarsky
See Also:
Function

Method Summary
 double getIPX(int i)
          The x-coordinate of the i-th inflection point.
 double getIPY(int i)
          The y-coordinate of the i-th inflection point.
 int getSegmentCount()
          Returns the number of line segments of which the piecewise-linear function consists.
 boolean isLeftopen(int i)
          Returns true if the i-th inflection point is in the definition interval of the segment and false if not.
 
Methods inherited from interface unikl.disco.math.functions.Function
f, getAlias, getGradientAt, getLabel, getMaxX, getMinX, setAlias
 

Method Detail

getSegmentCount

int getSegmentCount()
Returns the number of line segments of which the piecewise-linear function consists.

Returns:
the number of segments

getIPX

double getIPX(int i)
The x-coordinate of the i-th inflection point. i needs to be in the range [0,getSegmentCount()).

Parameters:
i - the index of the inflection point
Returns:
the x-coordinate of the inflection point

getIPY

double getIPY(int i)
The y-coordinate of the i-th inflection point. i needs to be in the range [0,getSegmentCount()).

Parameters:
i - the index of the inflection point
Returns:
the y-coordinate of the inflection point

isLeftopen

boolean isLeftopen(int i)
Returns true if the i-th inflection point is in the definition interval of the segment and false if not.

Parameters:
i - the index of the inflection point
Returns:
whether the inflection point is in the segment's definition interval