Namespaces

Types in MathNet.Numerics.RootFinding

Type Broyden

Namespace MathNet.Numerics.RootFinding

Algorithm by Broyden. Implementation inspired by Press, Teukolsky, Vetterling, and Flannery, "Numerical Recipes in C", 2nd edition, Cambridge University Press

Static Functions

Public Static Functions

Double[] FindRoot(Func<Double[], Double[]> f, Double[] initialGuess, double accuracy, int maxIterations)

Find a solution of the equation f(x)=0.
Parameters
Func<Double[], Double[]> f

The function to find roots from.

Double[] initialGuess

Initial guess of the root.

double accuracy

Desired accuracy. The root will be refined until the accuracy or the maximum number of iterations is reached. Default 1e-8.

int maxIterations

Maximum number of iterations. Default 100.

Return
Double[]

Returns the root with the specified accuracy.

bool TryFindRoot(Func<Double[], Double[]> f, Double[] initialGuess, double accuracy, int maxIterations, Double[]& root)