Click or drag to resize

CachingMotionEvaluator<T> Class

A wrapper for any MotionEvaluator<T> that caches the last evaluated result. This way, if a second evaluation is requested for the same date, the value is returned without recomputing it. This class is intended to be returned by GetCachingWrapper().
Inheritance Hierarchy
System.Object
  AGI.Foundation.Function<JulianDate, T>
    AGI.Foundation.MotionEvaluator<T>
      AGI.Foundation.Infrastructure.CachingMotionEvaluator<T>

Namespace:  AGI.Foundation.Infrastructure
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 25.1.421.0 (25.1.421.0)
Syntax
public sealed class CachingMotionEvaluator<T> : MotionEvaluator<T>, 
	ICachingEvaluator, IEvaluator, IAvailability, IThreadAware, ICloneWithContext, 
	IDisposable

Type Parameters

T
The type of motion returned by evaluation.

The CachingMotionEvaluator<T> type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyAvailabilityIntervals
Gets a TimeIntervalCollection over which data is available. If the availability interval is infinite, this returns Infinite.
(Inherited from MotionEvaluator<T>.)
Public propertyGroup
Gets the group that contains this evaluator.
(Inherited from MotionEvaluator<T>.)
Public propertyIsThreadSafe
Gets a value indicating whether the methods on this instance are safe to call from multiple threads simultaneously.
(Overrides Function<TIndependent, TDependent>.IsThreadSafe.)
Public propertyIsTimeVarying
Gets a value indicating whether or not the value of this evaluator changes with time. If false, the evaluator is assumed to return the same value for any input JulianDate.
(Overrides MotionEvaluator<T>.IsTimeVarying.)
Top
Methods
  NameDescription
Public methodClearCache
Clears any values cached by this evaluator.
Public methodClone
Clones this object using the specified context.
(Overrides Function<TIndependent, TDependent>.Clone(CopyContext).)
Public methodDispose()
Releases any resources associated with this instance.
(Inherited from Function<TIndependent, TDependent>.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodEvaluate(JulianDate)
Evaluates the function.
(Overrides MotionEvaluator<T>.Evaluate(JulianDate).)
Public methodEvaluate(JulianDate, Int32)
Evaluates the function, first checking for a cached result corresponding to date and order.
(Overrides MotionEvaluator<T>.Evaluate(JulianDate, Int32).)
Public methodEvaluate(TimeInterval, Duration, Int32)
Evaluates this evaluator at a specified fixed step over the specified interval.
(Inherited from MotionEvaluator<T>.)
Public methodEvaluate(JulianDate, JulianDate, Duration, Int32)
Evaluates this evaluator at a specified fixed step over the specified interval.
(Inherited from MotionEvaluator<T>.)
Public methodEvaluate(TimeInterval, Duration, Int32, ITrackCalculationProgress)
Evaluates this evaluator at a specified fixed step over the specified interval.
(Inherited from MotionEvaluator<T>.)
Public methodEvaluate(JulianDate, JulianDate, Duration, Int32, ITrackCalculationProgress)
Evaluates this evaluator at a specified fixed step over the specified interval.
(Inherited from MotionEvaluator<T>.)
Public methodGetAvailabilityIntervals
Gets the intervals over which data is available.
(Overrides MotionEvaluator<T>.GetAvailabilityIntervals(TimeIntervalCollection).)
Public methodGetCachingWrapper
Gets a version of this evaluator that caches the previously computed value so that if it is evaluated twice at the same date the computation is done only once.
(Overrides MotionEvaluator<T>.GetCachingWrapper().)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetNextSampleSuggestion
Gets a suggestion for the next JulianDate value at which to sample this function.
(Overrides Function<TIndependent, TDependent>.GetNextSampleSuggestion(TIndependent).)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsAvailable
Determines if valid data is available for the given JulianDate.
(Overrides MotionEvaluator<T>.IsAvailable(JulianDate).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodCode exampleUpdateEvaluatorReferences
Updates the evaluator references held by this object using the reference-to-reference mapping in the specified CopyContext.
(Overrides MotionEvaluator<T>.UpdateEvaluatorReferences(CopyContext).)
Top
See Also