fsolve-js
Version:
A numerical solver for non-linear systems of equations, utilizing the n-dimensional Newton-Raphson method.
34 lines (33 loc) • 1.01 kB
TypeScript
import { Matrix } from "mathjs";
/**
* Differentiator class
* Implements the numerical calculation of a jacobian
*/
export declare class Differentiator {
/**
* Delta variation to calculate derivatives numerically
*/
private delta;
/**
* Jacobian class constructor
* @param delta Delta variation to calculate derivatives numerically
*/
constructor(delta?: number);
/**
* Calculates numerical jacobian of f (vector) evaluated at x (vector)
* @param f function vector (m x 1)
* @param x point vector (n x 1) mathjs matrix
*
* @returns jacobian matrix (m x n),
*/
jacobian(f: (x: Matrix) => Matrix, x: Matrix): Matrix;
/**
* Numerically calculates the gradient of f evaluated at x.
*/
gradient(f: (x: Matrix) => number, x: Matrix): Matrix;
/**
* Numerically calculates the jth partial derivative at x
*/
partialDiff(f: (x: Matrix) => number, j: number, x: Matrix): number;
private replaceRow;
}