gmath.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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: 2007-08-26
  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 GMATH_H_
  19. #define GMATH_H_
  20. #include <grass/config.h>
  21. #if defined(HAVE_LIBLAPACK) && defined(HAVE_LIBBLAS) && defined(HAVE_G2C_H)
  22. /* only include if available */
  23. #include <grass/la.h>
  24. #endif
  25. /* fft.c */
  26. int fft(int, double *[2], int, int, int);
  27. int fft2(int, double (*)[2], int, int, int);
  28. /* gauss.c */
  29. double G_math_rand_gauss(int, double);
  30. /* max_pow2.c */
  31. long G_math_max_pow2(long);
  32. long G_math_min_pow2(long);
  33. /* rand1.c */
  34. float G_math_rand(int);
  35. /* del2g.c */
  36. int del2g(double *[2], int, double);
  37. /* findzc.c */
  38. int G_math_findzc(double[], int, double[], double, int);
  39. /* getg.c */
  40. int getg(double, double *[2], int);
  41. /* eigen.c */
  42. int eigen(double **, double **, double *, int);
  43. int egvorder2(double *, double **, long);
  44. int transpose2(double **, long);
  45. /* jacobi.c */
  46. #define MX 9
  47. int jacobi(double[MX][MX], long, double[MX], double[MX][MX]);
  48. int egvorder(double[MX], double[MX][MX], long);
  49. int transpose(double[MX][MX], long);
  50. /* mult.c */
  51. int mult(double *v1[2], int size1, double *v2[2], int size2, double *v3[2],
  52. int size3);
  53. #endif /* GMATH_H_ */