gmath.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. #ifdef CTYPESGEN
  22. #undef __attribute__
  23. #define __attribute__(x)
  24. #endif
  25. #include <stddef.h>
  26. /*solver names */
  27. #define G_MATH_SOLVER_DIRECT_GAUSS "gauss"
  28. #define G_MATH_SOLVER_DIRECT_LU "lu"
  29. #define G_MATH_SOLVER_DIRECT_CHOLESKY "cholesky"
  30. #define G_MATH_SOLVER_ITERATIVE_JACOBI "jacobi"
  31. #define G_MATH_SOLVER_ITERATIVE_SOR "sor"
  32. #define G_MATH_SOLVER_ITERATIVE_CG "cg"
  33. #define G_MATH_SOLVER_ITERATIVE_PCG "pcg"
  34. #define G_MATH_SOLVER_ITERATIVE_BICGSTAB "bicgstab"
  35. /*preconditioner */
  36. #define G_MATH_DIAGONAL_PRECONDITION 1
  37. #define G_MATH_ROWSCALE_ABSSUMNORM_PRECONDITION 2
  38. #define G_MATH_ROWSCALE_EUKLIDNORM_PRECONDITION 3
  39. #define G_MATH_ROWSCALE_MAXNORM_PRECONDITION 4
  40. /*!
  41. * \brief The row vector of the sparse matrix
  42. * */
  43. typedef struct
  44. {
  45. double *values; /*The non null values of the row */
  46. unsigned int cols; /*Number of entries */
  47. unsigned int *index; /*the index number */
  48. } G_math_spvector;
  49. #include <grass/defs/gmath.h>
  50. #endif /* GRASS_GMATH_H */