gmath.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /******************************************************************************
  2. * gmath.h
  3. * Top level header file for gmath units
  4. * @Copyright David D.Gray <ddgray@armadce.demon.co.uk>
  5. * 27th. Sep. 2000
  6. * Last updated: $Id$
  7. *
  8. * This file is part of GRASS GIS. It is free software. You can
  9. * redistribute it and/or modify it under the terms of
  10. * the GNU General Public License as published by the Free Software
  11. * Foundation; either version 2 of the License, or (at your option)
  12. * any later version.
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. ******************************************************************************/
  18. #ifndef GRASS_GMATH_H
  19. #define GRASS_GMATH_H
  20. #include <grass/config.h>
  21. #include <stddef.h>
  22. /*solver names */
  23. #define G_MATH_SOLVER_DIRECT_GAUSS "gauss"
  24. #define G_MATH_SOLVER_DIRECT_LU "lu"
  25. #define G_MATH_SOLVER_DIRECT_CHOLESKY "cholesky"
  26. #define G_MATH_SOLVER_ITERATIVE_JACOBI "jacobi"
  27. #define G_MATH_SOLVER_ITERATIVE_SOR "sor"
  28. #define G_MATH_SOLVER_ITERATIVE_CG "cg"
  29. #define G_MATH_SOLVER_ITERATIVE_PCG "pcg"
  30. #define G_MATH_SOLVER_ITERATIVE_BICGSTAB "bicgstab"
  31. /*preconditioner */
  32. #define G_MATH_DIAGONAL_PRECONDITION 1
  33. #define G_MATH_ROWSCALE_ABSSUMNORM_PRECONDITION 2
  34. #define G_MATH_ROWSCALE_EUKLIDNORM_PRECONDITION 3
  35. #define G_MATH_ROWSCALE_MAXNORM_PRECONDITION 4
  36. /*!
  37. * \brief The row vector of the sparse matrix
  38. * */
  39. typedef struct
  40. {
  41. double *values; /*The non null values of the row */
  42. unsigned int cols; /*Number of entries */
  43. unsigned int *index; /*the index number */
  44. } G_math_spvector;
  45. #include <grass/defs/gmath.h>
  46. #endif /* GRASS_GMATH_H */