|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.moioli.drawables.AbstractDrawableFunction
net.moioli.drawables.FunctionByPointsLines
public class FunctionByPointsLines
A function which is defined (empirically) from a set of points, and interpolated/ extrapolated with lines.
Constructor Summary | |
---|---|
FunctionByPointsLines()
Default constructor (y=x) |
|
FunctionByPointsLines(java.util.Collection points)
Standard constructor. |
Method Summary | |
---|---|
void |
drawMe(GraphicsI g,
Scale s,
java.lang.Object c)
This method is automatically called by DefaultChart to draw the objects it contains, so end users should never call drawMe directly. |
double |
f(double x)
Returns the y value corresponding to the specified x. |
double[] |
getAscissae()
Returns an array with the ascissae of the points that define this function. |
double[] |
getOrdinate()
Returns an array with the ordinate of the points that define this function. |
double |
maxY(double minX,
double maxX)
Returns the maximum y value that should be represented in the DefaultChart for this object to be drawn properly. |
double |
minY(double minX,
double maxX)
Returns the minimum y value that should be represented in the DefaultChart for this object to be drawn properly. |
void |
setAscissae(double[] ascissae)
Changes the ascissae of the points that define this function. |
void |
setOrdinate(double[] ordinate)
Changes the ordinate of the points that define this function. |
Methods inherited from class net.moioli.drawables.AbstractDrawableFunction |
---|
getMaximum, getMinimum |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FunctionByPointsLines()
public FunctionByPointsLines(java.util.Collection points)
points
- a DoublePoint Collection.Method Detail |
---|
public double f(double x)
f
in interface FunctionI
f
in class AbstractDrawableFunction
x
- the abscissa
FunctionI.f(double)
public void drawMe(GraphicsI g, Scale s, java.lang.Object c)
drawMe
in interface DrawableI
drawMe
in class AbstractDrawableFunction
g
- the surface where this object will be drawns
- the DefaultChart's Scale objectc
- the color to be used for drawingDrawableI.drawMe(GraphicsI, Scale, Object)
public double minY(double minX, double maxX)
minY
in interface DrawableI
minY
in class AbstractDrawableFunction
minX
- the minimum x value represented in this DefaultChartmaxX
- the maximum x value represented in this DefaultChart
DrawableI.minY(double, double)
public double maxY(double minX, double maxX)
maxY
in interface DrawableI
maxY
in class AbstractDrawableFunction
minX
- the minimum x value represented in this DefaultChartmaxX
- the maximum x value represented in this DefaultChart
DrawableI.maxY(double, double)
public double[] getAscissae()
getAscissae
in interface FunctionByPointsI
public void setAscissae(double[] ascissae)
setAscissae
in interface FunctionByPointsI
ascissae
- the ascissae to set.public double[] getOrdinate()
getOrdinate
in interface FunctionByPointsI
public void setOrdinate(double[] ordinate)
setOrdinate
in interface FunctionByPointsI
ordinate
- the ascissae to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |