Maths.MinimumSearch<T>

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

Constructors

MinimumSearch

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

MinimumSearch

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

MinimumSearch

#
public MinimumSearch()
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.