Header menu logo bristlecone

Tensor Module

Nested modules

Modules Description

Interval

Functions for constraining the interval over which to conduct root-finding.

Functions and values

Function or value Description

bisect f target lo hi tol maxIter

Full Usage: bisect f target lo hi tol maxIter

Parameters:
Returns: Tensor

Bisect method for finding root of non-linear equations. `adSafe` keeps within tensor space for all operations, but is substantially slower owing to two casts.

f : Tensor -> Tensor
target : Tensor
lo : Tensor
hi : Tensor
tol : Tensor
maxIter : int
Returns: Tensor

newtonRaphson f target x0 lo hi maxIter

Full Usage: newtonRaphson f target x0 lo hi maxIter

Parameters:
Returns: Tensor

Newton–Raphson root finder using AD for derivative.

f : Tensor -> Tensor
target : Tensor
x0 : Tensor
lo : Tensor
hi : Tensor
maxIter : int
Returns: Tensor

refinedGrid f target grid values lo hi

Full Usage: refinedGrid f target grid values lo hi

Parameters:
Returns: Tensor

Finds the root of a non-linear equation by solving f() over an equally-spaced grid of size `nGrid`. Uses AD gradients.

f : Tensor -> Tensor
target : Tensor
grid : Tensor
values : Tensor
lo : Tensor
hi : Tensor
Returns: Tensor

Type something to start searching.