Class SearchClosestValueMonoticallyIncreasing

Object
org.anchoranalysis.math.optimization.SearchClosestValueMonoticallyIncreasing

public class SearchClosestValueMonoticallyIncreasing
extends Object
Given a monotonically increasing function of an integer, determine the input value that provides an output value as close to target as possible.

The input-values must be integers, and have a minimum bound.

It begins at the minimum-bound, and in a similar manner to exponential search, successively doubles, until a lower and upper bound are found.

It then proceeds with a binary-search-style recursive evaluation to find the integer value that produces the exact closest value to target.

An upper bound on the input-values may also be optionally imposed via boundUpper.

Author:
Owen Feehan