Skip to content

Nonlinear conjugate gradient method implementation

License

Notifications You must be signed in to change notification settings

AndreyBychkov/NCGM

Repository files navigation

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.

About

Nonlinear conjugate gradient method implementation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published