public class TimeIntervalFinder extends Object
JulianDateFunctionExplorer.| Constructor and Description |
|---|
TimeIntervalFinder()
Initializes a new instance with default parameters.
|
TimeIntervalFinder(Function2<JulianDate,Double> function,
double constraintValue)
Initializes a new instance using the specified function and constraint value.
|
TimeIntervalFinder(Function2<JulianDate,Double> function,
double constraintValue,
Duration samplingInterval)
Initializes a new instance using the specified function, constraint value,
and sampling interval.
|
| Modifier and Type | Method and Description |
|---|---|
TimeIntervalCollection |
findIntervals(JulianDate start,
boolean isStartIncluded,
JulianDate stop,
boolean isStopIncluded)
|
TimeIntervalCollection |
findIntervals(JulianDate start,
boolean isStartIncluded,
JulianDate stop,
boolean isStopIncluded,
ITrackCalculationProgress tracker)
|
TimeIntervalCollection |
findIntervals(JulianDate start,
JulianDate stop)
|
TimeIntervalCollection |
findIntervals(JulianDate start,
JulianDate stop,
ITrackCalculationProgress tracker)
|
double |
getConstraintValue()
Gets the desired constraint value.
|
HierarchicalLogger |
getDebuggingLogger()
Gets a logger to which debugging information will be written.
|
double |
getExtremaCrossingUncertaintyFactor()
Gets a value determining how finely to explore an extremum with the potential to cross a threshold.
|
Function2<JulianDate,Double> |
getFunction()
Gets the function to evaluate.
|
boolean |
getMultithreadFindIntervals()
Gets a value indicating whether or not a call to
TimeIntervalFinder.findIntervals(agi.foundation.time.JulianDate,agi.foundation.time.JulianDate,ITrackCalculationProgress) should
be run in multithreaded mode. |
IJulianDateFunctionSampler |
getSampler()
Gets the sampler that controls the times at which the function is sampled
while searching for satisfaction intervals.
|
Duration |
getSamplingInterval()
Gets the independent variable sampling increment.
|
Duration |
getTimeTolerance()
Gets the convergence tolerance on the time when finding function extremum
and crossings of the constraint threshold.
|
double |
getValueTolerance()
Gets the convergence tolerance on the function value when finding function
extremum and crossings of the constraint threshold.
|
void |
setConstraintValue(double value)
Sets the desired constraint value.
|
void |
setDebuggingLogger(HierarchicalLogger value)
Sets a logger to which debugging information will be written.
|
void |
setExtremaCrossingUncertaintyFactor(double value)
Sets a value determining how finely to explore an extremum with the potential to cross a threshold.
|
void |
setFunction(Function2<JulianDate,Double> value)
Sets the function to evaluate.
|
void |
setMultithreadFindIntervals(boolean value)
Sets a value indicating whether or not a call to
TimeIntervalFinder.findIntervals(agi.foundation.time.JulianDate,agi.foundation.time.JulianDate,ITrackCalculationProgress) should
be run in multithreaded mode. |
void |
setSampler(IJulianDateFunctionSampler value)
Sets the sampler that controls the times at which the function is sampled
while searching for satisfaction intervals.
|
void |
setSamplingInterval(Duration value)
Sets the independent variable sampling increment.
|
void |
setTimeTolerance(Duration value)
Sets the convergence tolerance on the time when finding function extremum
and crossings of the constraint threshold.
|
void |
setValueTolerance(double value)
Sets the convergence tolerance on the function value when finding function
extremum and crossings of the constraint threshold.
|
public TimeIntervalFinder()
public TimeIntervalFinder(Function2<JulianDate,Double> function, double constraintValue)
function - The function to evaluate.constraintValue - The desired constraint value.public TimeIntervalFinder(Function2<JulianDate,Double> function, double constraintValue, @Nonnull Duration samplingInterval)
function - The function to evaluate.constraintValue - The desired constraint value.samplingInterval - The maximum interval on which to sample the function.public final Function2<JulianDate,Double> getFunction()
public final void setFunction(Function2<JulianDate,Double> value)
public final double getConstraintValue()
public final void setConstraintValue(double value)
public final IJulianDateFunctionSampler getSampler()
JulianDateFunctionSampling and JulianDateFunctionSampling.getFunctionSampler().
If this property is null, the function is sampled at fixed steps
defined by the SamplingInterval (get / set) property.public final void setSampler(IJulianDateFunctionSampler value)
JulianDateFunctionSampling and JulianDateFunctionSampling.getFunctionSampler().
If this property is null, the function is sampled at fixed steps
defined by the SamplingInterval (get / set) property.@Nonnull public final Duration getTimeTolerance()
ArgumentOutOfRangeException - Thrown if the user attempts to set a Duration whose
TotalSeconds (get) are less than or equal to zero.public final void setTimeTolerance(@Nonnull Duration value)
ArgumentOutOfRangeException - Thrown if the user attempts to set a Duration whose
TotalSeconds (get) are less than or equal to zero.public final double getValueTolerance()
ArgumentOutOfRangeException - Thrown if the user attempts to set a value less than or equal to zero.public final void setValueTolerance(double value)
ArgumentOutOfRangeException - Thrown if the user attempts to set a value less than or equal to zero.public final double getExtremaCrossingUncertaintyFactor()
ExtremaCrossingUncertaintyFactor (get / set)
on the JulianDateFunctionExplorer.public final void setExtremaCrossingUncertaintyFactor(double value)
ExtremaCrossingUncertaintyFactor (get / set)
on the JulianDateFunctionExplorer.public final boolean getMultithreadFindIntervals()
TimeIntervalFinder.findIntervals(agi.foundation.time.JulianDate,agi.foundation.time.JulianDate,ITrackCalculationProgress) should
be run in multithreaded mode.public final void setMultithreadFindIntervals(boolean value)
TimeIntervalFinder.findIntervals(agi.foundation.time.JulianDate,agi.foundation.time.JulianDate,ITrackCalculationProgress) should
be run in multithreaded mode.public final HierarchicalLogger getDebuggingLogger()
public final void setDebuggingLogger(HierarchicalLogger value)
public final TimeIntervalCollection findIntervals(@Nonnull JulianDate start, @Nonnull JulianDate stop)
Function (get / set) satisfies the
ConstraintValue (get / set) over the specified interval.start - The beginning of the interval on which to search.stop - The end of the interval on which to search.public final TimeIntervalCollection findIntervals(@Nonnull JulianDate start, @Nonnull JulianDate stop, @Nullable ITrackCalculationProgress tracker)
Function (get / set) satisfies the
ConstraintValue (get / set) over the specified interval.start - The beginning of the interval on which to search.stop - The end of the interval on which to search.tracker - The object to which progress is reported and that is able to cancel this operation before it is complete, or null.IllegalStateException - Thrown when the threshold crossings of the function are not consistent. This usually indicates that a
singularity exists near the threshold value.public final TimeIntervalCollection findIntervals(@Nonnull JulianDate start, boolean isStartIncluded, @Nonnull JulianDate stop, boolean isStopIncluded)
Function (get / set) satisfies the
ConstraintValue (get / set) over the specified interval.start - The beginning of the interval on which to search.isStartIncluded - true if the start date is included in the interval; otherwise false.stop - The end of the interval on which to search.isStopIncluded - true if the stop date is included in the interval; otherwise false.IllegalStateException - Thrown when the threshold crossings of the function are not consistent. This usually indicates that a
singularity exists near the threshold value.public final TimeIntervalCollection findIntervals(@Nonnull JulianDate start, boolean isStartIncluded, @Nonnull JulianDate stop, boolean isStopIncluded, @Nullable ITrackCalculationProgress tracker)
Function (get / set) satisfies the
ConstraintValue (get / set) over the specified interval.start - The beginning of the interval on which to search.isStartIncluded - true if the start date is included in the interval; otherwise false.stop - The end of the interval on which to search.isStopIncluded - true if the stop date is included in the interval; otherwise false.tracker - The object to which progress is reported and that is able to cancel this operation before it is complete, or null.IllegalStateException - Thrown when the threshold crossings of the function are not consistent. This usually indicates that a
singularity exists near the threshold value.