Maths.AbstractSearch<T>

References
public abstract class Maths.AbstractSearch<T>
Utility class for performing extreme searches.
TType of object.

Constructors

AbstractSearch

#
protected AbstractSearch((double d0, double d1) range, double boundary, T instance)
Create a new near search with initial constraints.
range ((double d0, double d1))Range.
boundary (double)Initial boundary condition.
instance (T)Initial value instance.

AbstractSearch

#
protected AbstractSearch((double d0, double d1) range, double boundary)
Create a new near search without an initial instance.
range ((double d0, double d1))Range.
boundary (double)Initial boundary condition.

Properties

Boundary

#
public double Boundary { get; }
Gets the boundary value associated with the current instance.

HasInstance

#
public bool HasInstance { get; }
Gets whether an object has been found.

Instance

#
public T Instance { get; }
Gets the found instance.

Range

#
public (double lower, double upper) Range { get; }
Gets the range within which values are considered.

Methods

Consider

#
public bool Consider(double value, T instance)
consider a new distance/value pair.
value (double)Distance associated with value.
instance (T)Value associated with distance.
True if the considered value became the new minimum value.

Improves

#
protected abstract bool Improves(double a, double b)
Test for improvement.
a (double)Value to check.
b (double)Value to check against.
True if a is considered to exceed b.

Convertors

OperationResultDescription
implicitMaths.AbstractSearch<T>TConvert the search to the instance.