public static class AdaptiveRejectionSampling.LineSegment extends PolynomialFunction.Linear implements java.lang.Comparable<java.lang.Double>
COLLINEAR_TOLERANCE| Constructor and Description |
|---|
LineSegment(PolynomialFunction.Linear line,
double left,
double right)
Creates a new instance of LineSegment
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Double o) |
double |
integrateExp()
Integrates the exponent of the line segment
|
double |
sampleExp(double p)
Sample from the exponent of the line segment
|
clone, differentiate, evaluate, fit, fit, getQ0, getQ1, roots, setQ0, setQ1, stationaryPoints, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdifferentiateevaluate, evaluateAsDoublepublic LineSegment(PolynomialFunction.Linear line, double left, double right)
line - The lineleft - Left (minimum) x-axis valueright - Right (maximum) x-axis valuepublic double sampleExp(double p)
p - Probability into the line segmentpublic double integrateExp()
public int compareTo(java.lang.Double o)
compareTo in interface java.lang.Comparable<java.lang.Double>