forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgmath.h
61 lines (50 loc) · 1.91 KB
/
gmath.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/******************************************************************************
* gmath.h
* Top level header file for gmath units
* @Copyright David D.Gray <[email protected]>
* 27th. Sep. 2000
* Last updated: $Id$
*
* This file is part of GRASS GIS. It is free software. You can
* redistribute it and/or modify it under the terms of
* the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
******************************************************************************/
#ifndef GRASS_GMATH_H
#define GRASS_GMATH_H
#include <grass/config.h>
#if defined(HAVE_LIBLAPACK) && defined(HAVE_LIBBLAS) && defined(HAVE_G2C_H)
/* only include if available */
#include <grass/la.h>
#endif
#include <stddef.h>
/*solver names */
#define G_MATH_SOLVER_DIRECT_GAUSS "gauss"
#define G_MATH_SOLVER_DIRECT_LU "lu"
#define G_MATH_SOLVER_DIRECT_CHOLESKY "cholesky"
#define G_MATH_SOLVER_ITERATIVE_JACOBI "jacobi"
#define G_MATH_SOLVER_ITERATIVE_SOR "sor"
#define G_MATH_SOLVER_ITERATIVE_CG "cg"
#define G_MATH_SOLVER_ITERATIVE_PCG "pcg"
#define G_MATH_SOLVER_ITERATIVE_BICGSTAB "bicgstab"
/*preconditioner */
#define G_MATH_DIAGONAL_PRECONDITION 1
#define G_MATH_ROWSCALE_ABSSUMNORM_PRECONDITION 2
#define G_MATH_ROWSCALE_EUKLIDNORM_PRECONDITION 3
#define G_MATH_ROWSCALE_MAXNORM_PRECONDITION 4
/*!
* \brief The row vector of the sparse matrix
* */
typedef struct
{
double *values; /*The non null values of the row */
unsigned int cols; /*Number of entries */
unsigned int *index; /*the index number */
} G_math_spvector;
#include <grass/defs/gmath.h>
#endif /* GRASS_GMATH_H */