LocalOpt
|
Supports for linear system solve and linear algebra. More...
#include <Support.h>
Public Member Functions | |
int | solvesystem (const int max_iterations, const Graph *Mat, double *solution, const double *rhs, const double precision) |
The method used to solve systems. More... | |
int | solveCG (const int max_iterations, const Graph *Mat, double *solution, const double *rhs, const double precision) |
The Conjugate Gradient method. Mat is assumed to be symmetric-positive-definite. | |
int | solveCGNR (const int max_iterations, const Graph *Mat, double *solution, const double *rhs, const double precision) |
The Least-Squares Conjugate Gradient method. Mat is assumed to be symmetric and non-singular. | |
int | solveMinRes (const int max_iterations, const Graph *Mat, double *solution, const double *rhs, const double precision, const bool show) |
The Minimal Residual method. Mat is assumed to be symmetric and non-singular. | |
void | sum (double *lhs, const double *rhs, int dimension) |
void | subtract (double *lhs, const double *rhs, int dimension) |
double | norm (const double *x, int dimension) |
void | copyvec (double *lhs, const double *rhs, int dimension) |
void | mult_scalar (double *x, int dimension, const double scal) |
double | inner_prod (const double *x, const double *y, int dimension) |
template<class ArrayType > | |
void | print_array (ArrayType x, int length) |
Supports for linear system solve and linear algebra.
int Support::solvesystem | ( | const int | max_iterations, |
const Graph * | Mat, | ||
double * | solution, | ||
const double * | rhs, | ||
const double | precision | ||
) |
The method used to solve systems.
Where the type of system solve is determined, e.g., CG or MINRES or CGNR ...etc