Click or drag to resize

DoubleFunctionExplorer Class

Explores one or more functions where the independent variable is Double and the dependent variable is double, looking for one or more threshold crossings or local extrema. Interesting findings while exploring the function are reported via events. A supplied callback is used to determine how the function is sampled.
Inheritance Hierarchy
SystemObject
  AGI.Foundation.NumericalMethodsDoubleFunctionExplorer

Namespace:  AGI.Foundation.NumericalMethods
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 19.5.402.0 (19.5.402.0)
Syntax
public class DoubleFunctionExplorer

The DoubleFunctionExplorer type exposes the following members.

Constructors
  NameDescription
Public methodDoubleFunctionExplorer
Initializes a new instance.
Top
Properties
  NameDescription
Public propertyCrossingVariableTolerance
Gets or sets the tolerance with which to converge on Variable when finding a precise crossing of a threshold. By default, this property has the value 0.005.
Public propertyCurrentVariable
Gets the current Variable, which is the Variable of the most recent sample.
Public propertyCurrentVariableIsValid
Gets a value indicating whether CurrentVariable is valid. CurrentVariable is invalid before the explorer is stepped for the first time.
Public propertyDebuggingLogger
Gets or sets a logger to which debugging information will be written.
Public propertyExploreExtremaToFindCrossings
Gets or sets a value indicating whether extrema should be explored if exploring those extrema could lead to additional threshold crossings being identified. Consider three sample points where the middle sampled value is higher than the other two so that the three points form two line segments with opposite slope. This configuration indicates that a local maximum exists somewhere between the three points. If all three points are below a threshold, it's possible that the local maximum, if found, will lie above the threshold. When this property is , that extremum is explored until it is found precisely, or it is determined based on ExtremaCrossingUncertaintyFactor that the extremum is unlikely to cross any threshold values. Such an extrema is explored even if FindAllExtremaPrecisely is . By default, this property has the value .
Public propertyExtremaCrossingUncertaintyFactor
Gets or sets a value determining how finely to explore an extremum with the potential to cross a threshold. At each iteration exploring the extremum this factor is multiplied against that iteration's Error to determine the tolerance to compare against the difference between the current guess of the extrema and the closest applicable threshold value. This property is only used if FindAllExtremaPrecisely is set to and ExploreExtremaToFindCrossings is set to . By default, this property has the value PositiveInfinity which effectively causes a complete search of all extrema. If you do not desire to completely search all extrema with the potential to cross a threshold, set this to a value greater than 1.0.
Public propertyExtremumVariableTolerance
Gets or sets the tolerance with which to converge on Variable when precisely finding a local extremum. By default, this property has the value 0.005.
Public propertyFindAllCrossingsPrecisely
Gets or sets a value indicating whether all crossings should be found precisely. If this property is , precise crossings will only be found if FindPreciseCrossing is called during the ThresholdCrossingIndicated event. By default, this property has the value .
Public propertyFindAllExtremaPrecisely
Gets or sets a value indicating whether all extrema should be found precisely. If this property is , precise extrema will only be found if FindPreciseExtremum is called during the ThresholdCrossingIndicated event, or if ExploreExtremaToFindCrossings is and the indicated extrema might cross the threshold. By default, this property has the value .
Public propertyFunctions
Gets the collection of functions to be explored.
Public propertyPreviousPreviousVariable
Gets the Variable of the previous, previous sample.
Public propertyPreviousPreviousVariableIsValid
Gets a value indicating whether PreviousPreviousVariable is valid. PreviousPreviousVariable is invalid before the explorer is stepped for the third time.
Public propertyPreviousVariable
Gets the Variable of the previous sample.
Public propertyPreviousVariableIsValid
Gets a value indicating whether PreviousVariable is valid. PreviousVariable is invalid before the explorer is stepped for the second time.
Public propertyReportExtremaAtEndpoints
Gets or sets a value indicating whether extrema should be reported at the start and stop times given to Explore(Double, Double) when the function is not flat at those endpoints. By default, this property has the value .
Public propertySampleSuggestionCallback
Gets or sets the callback to use to determine the times at which to sample the Functions when the Explore(Double, Double) method is called.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExplore(Double, Double)
Explores the function, raising events for each finding.
Public methodExplore(Double, Double, ITrackCalculationProgress)
Explores the function, raising events for each finding.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReset
Resets exploration. After calling this method, CurrentVariableIsValid, PreviousVariableIsValid, and PreviousPreviousVariableIsValid all return .
Public methodStep
Explores the function through one step, raising events for any findings over the step.
Public methodStepInteractively
Steps exploration to a specified Variable. Any findings during the step are reported in an enumerable collection of DoubleFunctionEvents. Events are not raised for the findings unless the caller explicitly calls Raise on each finding.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventFunctionSampled
Raised each time a function is sampled. Note that this NOT raised when the function is sampled for the purpose of precisely finding a threshold crossing or extremum.
Public eventLocalExtremumFound
Raised when a precise local minimum or maximum has been found. This event will only be raised if the local extremum is found precisely. Local extrema are found precisely if:
Public eventLocalExtremumIndicated
Raised when three points are found that indicate the existence of a local extremum (minimum or maximum). When this event is raised, the exact extremum has not yet been identified.
Public eventThresholdCrossingFound
Raised when a precise threshold crossing has been found. This event will only be raised if FindAllCrossingsPrecisely is or FindPreciseCrossing is called during the handling of the ThresholdCrossingIndicated event.
Public eventThresholdCrossingIndicated
Raised when two points are found that indicate a threshold was crossed. When this event is raised, the exact crossing has not yet been identified.
Top
See Also