Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.06 KB

README.md

File metadata and controls

51 lines (33 loc) · 1.06 KB

NCGM: Nonlinear conjugate gradient method.

Build Status

Package for solving systems of equations like Hx = b.

API

Initializing

You can create matrices and vectors by init methods and special functions.

Example:

struct Vector v = initVector(size);
struct Squarematrix m = initMatrix(size);

struct SquareMatix e = eyeMatrix(size);

struct Vector i = readVectorFromStdIn();

Arithmetic operations

You can access operations like +, -, /, * by their name + data structure.

Example:

struct Vector v = addVector(v1, v2);
struct Matrix m = nultiplyMatrixOnNumber(m2, 2);

Also, there are mutable versions of operations, which alters one of arguments.

Example:

addMatrixMutable(chaging, term);

Optimization

You can optimize your functions by Fletcher Reeves optimization procedure.

Example:

struct Vector xPredicted = optimizeFletcherReeves(hessian, b, minusGrad);

P.S.

Also you can use test for examples.