|
|||||||||
| Home >> All >> com >> arranger >> jarl >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.arranger.jarl.util
Class InterpolationPair

java.lang.Objectcom.arranger.jarl.util.InterpolationPair
- public class InterpolationPair
- extends java.lang.Object
| Nested Class Summary | |
static class |
InterpolationPair.Segment
|
| Field Summary | |
protected InterpolationPair.Segment |
m_segmentOne
|
protected InterpolationPair.Segment |
m_segmentTwo
|
protected double |
m_slope
|
protected double |
m_yintercept
|
| Constructor Summary | |
InterpolationPair(InterpolationPair.Segment segmentOne,
InterpolationPair.Segment segmentTwo)
(x1, y1) (x2, y2) y = mx + b m = y2 - y2 / x2 - x1 b = y - mx |
|
| Method Summary | |
int |
checkRange(double xval)
-1, means too small 0, means correct 1, means to large |
InterpolationPair.Segment |
getSegmentOne()
|
InterpolationPair.Segment |
getSegmentTwo()
|
double |
getSlope()
|
double |
getYintercept()
|
double |
getYValue(double xval)
y = mx + b we know m, x & b |
double |
getYValue(double xval,
boolean interpolate)
If interpolate is turned off, then it returns the value closest to the target segment |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
m_segmentOne
protected InterpolationPair.Segment m_segmentOne
m_segmentTwo
protected InterpolationPair.Segment m_segmentTwo
m_slope
protected double m_slope
m_yintercept
protected double m_yintercept
| Constructor Detail |
InterpolationPair
public InterpolationPair(InterpolationPair.Segment segmentOne, InterpolationPair.Segment segmentTwo)
- (x1, y1) (x2, y2)
y = mx + b
m = y2 - y2 / x2 - x1
b = y - mx
| Method Detail |
checkRange
public int checkRange(double xval)
- -1, means too small
0, means correct
1, means to large
getYValue
public double getYValue(double xval)
- y = mx + b
we know m, x & b
getYValue
public double getYValue(double xval,
boolean interpolate)
- If interpolate is turned off, then it returns the value closest to the target segment
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
getSegmentOne
public InterpolationPair.Segment getSegmentOne()
getSegmentTwo
public InterpolationPair.Segment getSegmentTwo()
getSlope
public double getSlope()
getYintercept
public double getYintercept()
|
|||||||||
| Home >> All >> com >> arranger >> jarl >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.arranger.jarl.util.InterpolationPair