public class BisectionStepper extends Stepper
Modifier and Type | Field and Description |
---|---|
protected int |
iterations |
protected int |
maxIterations |
protected double |
thrDiff |
protected double |
threshold1 |
protected double |
threshold2 |
Constructor and Description |
---|
BisectionStepper(double threshold,
double lastThreshold)
Initialize the bisection stepper with a start threshold and its
last threshold
|
Modifier and Type | Method and Description |
---|---|
double |
getValue()
Get current threshold.
|
boolean |
isFinished()
If the difference between both thresholds is < 1, we consider
that as reasonable close to abort the regression.
|
void |
update(double value)
Update threshold by a bisection step.
|
protected double threshold1
protected double threshold2
protected double thrDiff
protected int iterations
protected int maxIterations
public BisectionStepper(double threshold, double lastThreshold)
threshold
- The current thresholdlastThreshold
- The last thresholdpublic void update(double value)
value
is below zero or
not a number, the step is made upwards. If it is above zero, the stoep is
downwards.public boolean isFinished()
isFinished
in class Stepper
Copyright © 2015–2021 Fiji. All rights reserved.