|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Differentiator
This interface defines calculus of a differentiator. It may be used in
different ways. Either you can set a list of x/y values using the
setData(double[], double[]) method, or you can add values during the life-time of the
differentiator using the add(double, double) method. Calling getDerivative()
returns the first derivative at the cusp of the data points, i.e. at the
highest x-value.
For performance issues, the differentiator uses primitive data types instead
of Double objects.
| Method Summary | |
|---|---|
void |
add(double y)
Adds a new point to the data set, stating only a y value for an equally-spaced data set. |
void |
add(double x,
double y)
Adds a new point to the data set, stating both, the x and y value. |
double |
getDerivative()
Calculates the first derivative at the highest x-value or at the most recently added y-value in equal-sized data sets. |
double |
getDerivative(double x)
Calculates the first derivative at the stated x-value. |
void |
setData(double[] y)
Sets an equally-spaced y-data set. |
void |
setData(double[] x,
double[] y)
Sets an entire list of x/y data points. |
| Method Detail |
|---|
void setData(double[] x,
double[] y)
x - A double-array representing the x-axis values.y - A double-array representing the y-axis values.void setData(double[] y)
y - A double-array representing the y-axis values.
void add(double x,
double y)
x - A newly added x-value.y - A newly added y-value.void add(double y)
y - A newly added y-value.double getDerivative()
double getDerivative(double x)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||