All Packages Class Hierarchy This Package Previous Next Index
Class com.micronova.math.LinearSegmentedCurve
java.lang.Object
|
+----netscape.util.Vector
|
+----com.micronova.util.SortedVector
|
+----com.micronova.math.SegmentedCurve
|
+----com.micronova.math.LinearSegmentedCurve
- public class LinearSegmentedCurve
- extends SegmentedCurve
A SegmentedCurve with linear interpolation. Given N boundary CurvePoints {(x[0], y[0]), ..., (x[N-1], y[N-1])}, the curve value f(x) is defined as follows:
- x[0] if x < x[0]
- y[k] + (y[k+1] - y[k]) * (x - x[k]) / (x[k+1] - x[k]) if x[k] <= x < x[k+1] (k = 1, 2, ..., N-1)
- x[N-1] if x >= x[N-1]
(f(x) = 0 if there is no boundary CurvePoints).
- Version:
- 1.0
- Author:
- Makoto Nagata, MicroNova
-
LinearSegmentedCurve()
-
-
getValueInSegment(double, int)
- Defines the value for a given point x in index-th segment.
LinearSegmentedCurve
public LinearSegmentedCurve()
getValueInSegment
public double getValueInSegment(double x,
int index)
- Defines the value for a given point x in index-th segment.
- Overrides:
- getValueInSegment in class SegmentedCurve
All Packages Class Hierarchy This Package Previous Next Index