GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <math.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/gmath.h>
#include <grass/glocale.h>
Go to the source code of this file.
Macros | |
#define | G_MATH_ROWSCALE_L2_NORM_PRECONDITION 1 |
#define | G_MATH_ROWSCALE_L1_NORM_PRECONDITION 2 |
#define | G_MATH_DIAGONAL_PRECONDITION 3 |
Functions | |
int | G_math_solver_pcg (double **A, double *x, double *b, int rows, int maxit, double err, int prec) |
The iterative preconditioned conjugate gradients solver for symmetric positive definite matrices. More... | |
int | G_math_solver_sparse_pcg (G_math_spvector **Asp, double *x, double *b, int rows, int maxit, double err, int prec) |
The iterative preconditioned conjugate gradients solver for sparse symmetric positive definite matrices. More... | |
int | G_math_solver_cg (double **A, double *x, double *b, int rows, int maxit, double err) |
The iterative conjugate gradients solver for symmetric positive definite matrices. More... | |
int | G_math_solver_sparse_cg (G_math_spvector **Asp, double *x, double *b, int rows, int maxit, double err) |
The iterative conjugate gradients solver for sparse symmetric positive definite matrices. More... | |
int | G_math_solver_bicgstab (double **A, double *x, double *b, int rows, int maxit, double err) |
The iterative biconjugate gradients solver with stabilization for unsymmetric non-definite matrices. More... | |
int | G_math_solver_sparse_bicgstab (G_math_spvector **Asp, double *x, double *b, int rows, int maxit, double err) |
The iterative biconjugate gradients solver with stabilization for unsymmetric non-definite matrices. More... | |
#define G_MATH_DIAGONAL_PRECONDITION 3 |
Definition at line 29 of file solvers_krylov.c.
#define G_MATH_ROWSCALE_L1_NORM_PRECONDITION 2 |
Definition at line 28 of file solvers_krylov.c.
#define G_MATH_ROWSCALE_L2_NORM_PRECONDITION 1 |
Definition at line 27 of file solvers_krylov.c.
The iterative biconjugate gradients solver with stabilization for unsymmetric non-definite matrices.
This iterative solver works with regular quadratic matrices.
This solver solves the linear equation system: A x = b
The parameter maxit specifies the maximum number of iterations. If the maximum is reached, the solver will abort the calculation and writes the current result into the vector x. The parameter err defines the error break criteria for the solver.
A | (double **) – the matrix |
x | (double *) – the value vector |
b | (double *) – the right hand side |
rows | (int) |
maxit | (int) – the maximum number of iterations |
err | (double) – defines the error break criterias |
Definition at line 466 of file solvers_krylov.c.
References NULL.
The iterative conjugate gradients solver for symmetric positive definite matrices.
This iterative solver works with symmetric positive definite regular quadratic matrices.
This solver solves the linear equation system: A x = b
The parameter maxit specifies the maximum number of iterations. If the maximum is reached, the solver will abort the calculation and writes the current result into the vector x. The parameter err defines the error break criteria for the solver.
A | (double **) – the matrix |
x | (double *) – the value vector |
b | (double *) – the right hand side |
rows | (int) |
maxit | (int) – the maximum number of iterations |
err | (double) – defines the error break criteria |
Definition at line 274 of file solvers_krylov.c.
References NULL.
int G_math_solver_pcg | ( | double ** | A, |
double * | x, | ||
double * | b, | ||
int | rows, | ||
int | maxit, | ||
double | err, | ||
int | prec | ||
) |
The iterative preconditioned conjugate gradients solver for symmetric positive definite matrices.
This iterative solver works with symmetric positive definite regular quadratic matrices.
This solver solves the linear equation system: A x = b
The parameter maxit specifies the maximum number of iterations. If the maximum is reached, the solver will abort the calculation and writes the current result into the vector x. The parameter err defines the error break criteria for the solver.
A | (double **) – the matrix |
x | (double *) – the value vector |
b | (double *) – the right hand side |
rows | (int) |
maxit | (int) – the maximum number of iterations |
err | (double) – defines the error break criteria |
prec | (int) – the preconditioner which shoudl be used 1,2 or 3 |
Definition at line 64 of file solvers_krylov.c.
References NULL.
int G_math_solver_sparse_bicgstab | ( | G_math_spvector ** | Asp, |
double * | x, | ||
double * | b, | ||
int | rows, | ||
int | maxit, | ||
double | err | ||
) |
The iterative biconjugate gradients solver with stabilization for unsymmetric non-definite matrices.
This iterative solver works with sparse matrices.
This solver solves the linear equation system: A x = b
The parameter maxit specifies the maximum number of iterations. If the maximum is reached, the solver will abort the calculation and writes the current result into the vector x. The parameter err defines the error break criteria for the solver.
Asp | (G_math_spvector **) – the sparse matrix |
x | (double *) – the value vector |
b | (double *) – the right hand side |
rows | (int) |
maxit | (int) – the maximum number of iterations |
err | (double) – defines the error break criterias |
Definition at line 493 of file solvers_krylov.c.
References NULL.
int G_math_solver_sparse_cg | ( | G_math_spvector ** | Asp, |
double * | x, | ||
double * | b, | ||
int | rows, | ||
int | maxit, | ||
double | err | ||
) |
The iterative conjugate gradients solver for sparse symmetric positive definite matrices.
This iterative solver works with symmetric positive definite sparse matrices.
This solver solves the linear equation system: A x = b
The parameter maxit specifies the maximum number of iterations. If the maximum is reached, the solver will abort the calculation and writes the current result into the vector x. The parameter err defines the error break criteria for the solver.
Asp | (G_math_spvector **) – the sparse matrix |
x | (double *) – the value vector |
b | (double *) – the right hand side |
rows | (int) |
maxit | (int) – the maximum number of iterations |
err | (double) – defines the error break criterias |
Definition at line 301 of file solvers_krylov.c.
References NULL.
int G_math_solver_sparse_pcg | ( | G_math_spvector ** | Asp, |
double * | x, | ||
double * | b, | ||
int | rows, | ||
int | maxit, | ||
double | err, | ||
int | prec | ||
) |
The iterative preconditioned conjugate gradients solver for sparse symmetric positive definite matrices.
This iterative solver works with symmetric positive definite sparse matrices.
This solver solves the linear equation system: A x = b
The parameter maxit specifies the maximum number of iterations. If the maximum is reached, the solver will abort the calculation and writes the current result into the vector x. The parameter err defines the error break criteria for the solver.
Asp | (G_math_spvector **) – the sparse matrix |
x | (double *) – the value vector |
b | (double *) – the right hand side |
rows | (int) |
maxit | (int) – the maximum number of iterations |
err | (double) – defines the error break criteria |
prec | (int) – the preconditioner which shoudl be used 1,2 or 3 |
Definition at line 93 of file solvers_krylov.c.
References NULL.