Brent Module

Functions and values

Function or value Description

maximize f lowerBound upperBound

Full Usage: maximize f lowerBound upperBound

Parameters:
    f : float -> float -
    lowerBound : float -
    upperBound : float -

Returns: float option

Finds the maximum in the given function between the lower and upper boundary with tolerance 10^-7 via brent search. Returns None if 100 iterations are reached.

f : float -> float

lowerBound : float

upperBound : float

Returns: float option

Example

maximizeWith f lowerBound upperBound tolerance maxIterations

Full Usage: maximizeWith f lowerBound upperBound tolerance maxIterations

Parameters:
    f : float -> float -
    lowerBound : float -
    upperBound : float -
    tolerance : float -
    maxIterations : int -

Returns: float option

Finds the maximum in the given function between the lower and upper boundary with given tolerance via brent search. Returns None if maxiterations are reached.

f : float -> float

lowerBound : float

upperBound : float

tolerance : float

maxIterations : int

Returns: float option

Example

minimize f lowerBound upperBound

Full Usage: minimize f lowerBound upperBound

Parameters:
    f : float -> float -
    lowerBound : float -
    upperBound : float -

Returns: float option

Finds the minimum in the given function between the lower and upper boundary with tolerance 10^-7 via brent search. Returns None if 100 iterations are reached.

f : float -> float

lowerBound : float

upperBound : float

Returns: float option

Example

minimizeWith f lowerBound upperBound tolerance maxIterations

Full Usage: minimizeWith f lowerBound upperBound tolerance maxIterations

Parameters:
    f : float -> float -
    lowerBound : float -
    upperBound : float -
    tolerance : float -
    maxIterations : int -

Returns: float option

Finds the minimum in the given function between the lower and upper boundary with given tolerance via brent search. Returns None if maxiterations are reached.

f : float -> float

lowerBound : float

upperBound : float

tolerance : float

maxIterations : int

Returns: float option

Example