public static class AdaptiveRejectionSampling.Point extends DefaultInputOutputPair<java.lang.Double,java.lang.Double> implements java.lang.Comparable<AdaptiveRejectionSampling.Point>
| Constructor and Description |
|---|
Point(double x,
double y)
Creates a new instance of Point
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(AdaptiveRejectionSampling.Point o) |
static double |
intercept(PolynomialFunction.Linear line1,
PolynomialFunction.Linear line2)
Computes the x-axis value where the two lines intersect
|
static PolynomialFunction.Linear |
line(int index,
java.util.ArrayList<AdaptiveRejectionSampling.Point> points)
Connects the points at index and index + 1 with a straight line.
|
create, create, getInput, getOutput, labelCollection, mergeCollections, setInput, setOutputgetFirst, getSecond, toStringclonepublic Point(double x,
double y)
x - Input (x-axis) valuey - Output (y-axis) value, most likely the natural logarithm of the
function output.public int compareTo(AdaptiveRejectionSampling.Point o)
compareTo in interface java.lang.Comparable<AdaptiveRejectionSampling.Point>public static PolynomialFunction.Linear line(int index, java.util.ArrayList<AdaptiveRejectionSampling.Point> points)
index - Lower index to connect to index + 1points - Points sorted along the x-axispublic static double intercept(PolynomialFunction.Linear line1, PolynomialFunction.Linear line2)
line1 - First line segmentline2 - Second line segment