Maths.MaximumSearch<T>

Maths.AbstractSearch<1>
public sealed class Maths.MaximumSearch<T> : Maths.AbstractSearch<T>
Utility class for performing far searches.
TType of object.

Constructors

MaximumSearch

#
public MaximumSearch((double, double) limit, double initialBoundary, T initialValue)
Create a new search with custom setup.
limit ((double, double))Limit boundary. Value exceeding the boundary will not be considered.
initialBoundary (double)Boundary at start of search.
initialValue (T)Instance value at start of search.

MaximumSearch

#
public MaximumSearch((double, double) limit)
Create a new search with a limiting boundary.
limit ((double, double))Limit boundary. Value exceeding the boundary will not be considered.

MaximumSearch

#
public MaximumSearch()
Create a new, blank search.

Properties

Boundary

public double Boundary { get; }
Gets the boundary value associated with the current instance.
inherited fromMaths.AbstractSearch<T>

HasInstance

public bool HasInstance { get; }
Gets whether an object has been found.
inherited fromMaths.AbstractSearch<T>

Instance

public T Instance { get; }
Gets the found instance.
inherited fromMaths.AbstractSearch<T>

Range

public (double lower, double upper) Range { get; }
Gets the range within which values are considered.
inherited fromMaths.AbstractSearch<T>

Methods

Consider

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

Improves

#
protected override 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.