on package:ad

The composition of two AD modes is an AD mode in its own right
Perform a conjugate gradient ascent using reverse mode automatic differentiation to compute the gradient.
Perform a conjugate gradient descent using reverse mode automatic differentiation to compute the gradient, and using forward-on-forward mode for computing extrema.
>>> let sq x = x * x

>>> let rosenbrock [x,y] = sq (1 - x) + 100 * sq (y - sq x)

>>> rosenbrock [0,0]
1

>>> rosenbrock (conjugateGradientDescent rosenbrock [0, 0] !! 5) < 0.1
True
Perform a conjugate gradient ascent using reverse mode automatic differentiation to compute the gradient.
Perform a conjugate gradient descent using reverse mode automatic differentiation to compute the gradient, and using forward-on-forward mode for computing extrema.
>>> let sq x = x * x

>>> let rosenbrock [x,y] = sq (1 - x) + 100 * sq (y - sq x)

>>> rosenbrock [0,0]
1

>>> rosenbrock (conjugateGradientDescent rosenbrock [0, 0] !! 5) < 0.1
True
common guts for Sparse.Double and Sparse mode Handle with care.
allowed to return False for items with a zero derivative, but we'll give more NaNs than strictly necessary
constrainedDescent obj fs env optimizes the convex function obj subject to the convex constraints f <= 0 where f elem fs. This is done using a log barrier to model constraints (i.e. Boyd, Chapter 11.3). The returned optimal point for the objective function must satisfy fs, but the initial environment, env, needn't be feasible.
The findZeroNoEq function behaves the same as findZero except that it doesn't truncate the list once the results become constant. This means it can be used with types without an Eq instance.
The findZeroNoEq function behaves the same as findZero except that it doesn't truncate the list once the results become constant. This means it can be used with types without an Eq instance.
The findZeroNoEq function behaves the same as findZero except that it doesn't truncate the list once the results become constant. This means it can be used with types without an Eq instance.