la.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef GRASS_LADEFSDEFS_H
  2. #define GRASS_LADEFSDEFS_H
  3. /* Matrix routines corresponding to BLAS Level III */
  4. mat_struct *G_matrix_init(int, int, int);
  5. int G_matrix_zero(mat_struct *);
  6. int G_matrix_set(mat_struct *, int, int, int);
  7. mat_struct *G_matrix_copy(const mat_struct *);
  8. mat_struct *G_matrix_add(mat_struct *, mat_struct *);
  9. mat_struct *G_matrix_subtract(mat_struct *, mat_struct *);
  10. mat_struct *G_matrix_scale(mat_struct *, const double);
  11. mat_struct *G__matrix_add(mat_struct *, mat_struct *, const double,
  12. const double);
  13. mat_struct *G_matrix_product(mat_struct *, mat_struct *);
  14. mat_struct *G_matrix_transpose(mat_struct *);
  15. int G_matrix_LU_solve(const mat_struct *, mat_struct **, const mat_struct *,
  16. mat_type);
  17. mat_struct *G_matrix_inverse(mat_struct *);
  18. void G_matrix_free(mat_struct *);
  19. void G_matrix_print(mat_struct *);
  20. int G_matrix_set_element(mat_struct *, int, int, double);
  21. double G_matrix_get_element(mat_struct *, int, int);
  22. /* Matrix-vector routines corresponding to BLAS Level II */
  23. vec_struct *G_matvect_get_column(mat_struct *, int);
  24. vec_struct *G_matvect_get_row(mat_struct *, int);
  25. vec_struct *G_matvect_product(mat_struct *, vec_struct *, vec_struct *);
  26. int G_matvect_extract_vector(mat_struct *, vtype, int);
  27. int G_matvect_retrieve_matrix(vec_struct *);
  28. /* Vector routines corresponding to BLAS Level I */
  29. vec_struct *G_vector_init(int, int, vtype);
  30. int G_vector_set(vec_struct *, int, int, vtype, int);
  31. double G_vector_norm_euclid(vec_struct *);
  32. double G_vector_norm_maxval(vec_struct *, int);
  33. vec_struct *G_vector_copy(const vec_struct *, int);
  34. vec_struct *G_vector_product (vec_struct *, vec_struct *, vec_struct *);
  35. /* Matrix and vector routines corresponding to ?? */
  36. void G_vector_free(vec_struct *);
  37. vec_struct *G_vector_sub(vec_struct *, vec_struct *, vec_struct *);
  38. double G_vector_norm1(vec_struct *);
  39. int G_matrix_read(FILE *, mat_struct *);
  40. int G_matrix_stdin(mat_struct *);
  41. int G_matrix_eigen_sort(vec_struct *, mat_struct *);
  42. mat_struct *G_matrix_scalar_mul(double, mat_struct *, mat_struct *);
  43. mat_struct *G_matrix_resize(mat_struct *, int, int);
  44. #endif /* GRASS_LADEFS_H */