public class JulianDateFunctionExtremumIndicated extends JulianDateFunctionFinding
JulianDateFunctionExplorer
that a function has a local extremum
indicated by three samples.Constructor and Description |
---|
JulianDateFunctionExtremumIndicated(JulianDateFunctionExplorer explorer,
JulianDateFunctionDetails function,
JulianDate leftDate,
double leftValue,
JulianDate middleDate,
double middleValue,
JulianDate rightDate,
double rightValue)
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
JulianDateFunctionExtremumFound |
exploreExtremumForCrossing(JulianDateFunctionThresholdDetails closestThreshold,
JulianDateFunctionThresholdDetails furthestThreshold,
boolean[] converged)
Searches an extremum until either the precise date at which the function reaches its extremum is found, or it is
determined that this extremum will not result in a crossing.
|
JulianDateFunctionExtremumFound |
findPreciseExtremum()
Finds the precise date at which the function reaches its extremum.
|
JulianDateFunctionExplorer |
getExplorer()
Gets the
JulianDateFunctionExplorer that found this indicated extremum. |
ExtremumType |
getExtremumType()
Gets a value indicating whether the extremum is a minimum or maximum.
|
JulianDateFunctionDetails |
getFunction()
Gets the function for which the extremum is indicated.
|
boolean |
getIsEndpointExtremum()
Gets a value indicating whether or not this extremum occurred at one of the endpoints
of an interval explored with
JulianDateFunctionExplorer.explore(JulianDate,JulianDate) . |
JulianDate |
getLeftDate()
Gets the left date.
|
FunctionSegmentSlope |
getLeftSegmentSlope()
Gets the slope between the left and middle samples.
|
double |
getLeftValue()
Gets the left function value.
|
JulianDate |
getMiddleDate()
Gets the middle date.
|
double |
getMiddleValue()
Gets the middle function value.
|
JulianDate |
getRightDate()
Gets the right date.
|
FunctionSegmentSlope |
getRightSegmentSlope()
Gets the slope between the middle and right samples.
|
double |
getRightValue()
Gets the right function value.
|
public JulianDateFunctionExtremumIndicated(JulianDateFunctionExplorer explorer, JulianDateFunctionDetails function, @Nonnull JulianDate leftDate, double leftValue, @Nonnull JulianDate middleDate, double middleValue, @Nonnull JulianDate rightDate, double rightValue)
explorer
- The explorer that found the indicated extremum.function
- The function for which an extremum was identified.leftDate
- The left date.leftValue
- The left function value.middleDate
- The middle date.middleValue
- The middle function value.rightDate
- The right date.rightValue
- The right function value.public final JulianDateFunctionExplorer getExplorer()
JulianDateFunctionExplorer
that found this indicated extremum.public final JulianDateFunctionDetails getFunction()
@Nonnull public final JulianDate getLeftDate()
public final double getLeftValue()
@Nonnull public final JulianDate getMiddleDate()
public final double getMiddleValue()
@Nonnull public final JulianDate getRightDate()
public final double getRightValue()
@Nonnull public final FunctionSegmentSlope getLeftSegmentSlope()
@Nonnull public final FunctionSegmentSlope getRightSegmentSlope()
@Nonnull public final ExtremumType getExtremumType()
public final boolean getIsEndpointExtremum()
JulianDateFunctionExplorer.explore(JulianDate,JulianDate)
.
Endpoint extrema do not necessarily indicate places in the function have a derivative of zero,
but they can still be global minima or maxima over the evaluation interval.@Nonnull public final JulianDateFunctionExtremumFound findPreciseExtremum()
@Nonnull public final JulianDateFunctionExtremumFound exploreExtremumForCrossing(JulianDateFunctionThresholdDetails closestThreshold, JulianDateFunctionThresholdDetails furthestThreshold, @Nonnull boolean[] converged)
Note that if the precise location of the extremum is not found due to it not being a candidate for a threshold crossing
then a LocalExtremumFound
(add
/ remove
) event will not be fired.
closestThreshold
- The threshold which is most likely to be crossed by this extremum, such that if this threshold is not crossed
by the extremum no other threshold will be crossed.furthestThreshold
- The threshold which is least likely to be crossed by this extremum, such that if this threshold is crossed
by the extremum all other thresholds will be crossed.converged
- This parameter will be set to true if returned extremum has converged, either because it resulted in a crossing or because
it converged before it could be definitely determined to not be likely to cross the threshold.