C# Класс Artemis.Engine.Maths.RootSolver

Показать файл Открыть проект

Открытые методы

Метод Описание
Cubic ( double A, double B, double C, double D ) : double[]

Solve for the real roots of a cubic. (Ax^3 + Bx^2 + Cx + D == 0)

NewtonsMethod ( double>.Func f, double>.Func df, double value, double initialGuess, double epsilon = 1e-9, int maxIterations = 1000 ) : double

Use the Newton-Raphson method to attempt to approximate the root of a function. In particular, this function takes in three parameters, f, df, and v. f and df are the function and its derivative respectively. This method then returns x such that f(x) = v (i.e. the root of f(x) - v = 0).

Quadratic ( double A, double B, double C ) : double[]

Solve for the real roots of a quadratic. (Ax^2 + Bx + C == 0)

Описание методов

Cubic() публичный статический Метод

Solve for the real roots of a cubic. (Ax^3 + Bx^2 + Cx + D == 0)
public static Cubic ( double A, double B, double C, double D ) : double[]
A double
B double
C double
D double
Результат double[]

NewtonsMethod() публичный статический Метод

Use the Newton-Raphson method to attempt to approximate the root of a function. In particular, this function takes in three parameters, f, df, and v. f and df are the function and its derivative respectively. This method then returns x such that f(x) = v (i.e. the root of f(x) - v = 0).
public static NewtonsMethod ( double>.Func f, double>.Func df, double value, double initialGuess, double epsilon = 1e-9, int maxIterations = 1000 ) : double
f double>.Func
df double>.Func
value double
initialGuess double
epsilon double
maxIterations int
Результат double

Quadratic() публичный статический Метод

Solve for the real roots of a quadratic. (Ax^2 + Bx + C == 0)
public static Quadratic ( double A, double B, double C ) : double[]
A double
B double
C double
Результат double[]