GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-d6dec75dd4
defs/la.h
Go to the documentation of this file.
1 #ifndef GRASS_LADEFSDEFS_H
2 #define GRASS_LADEFSDEFS_H
3 
4 /* Matrix routines corresponding to BLAS Level III */
5 
6 mat_struct *G_matrix_init(int, int, int);
8 int G_matrix_set(mat_struct *, int, int, int);
12 mat_struct *G_matrix_scale(mat_struct *, const double);
13 mat_struct *G__matrix_add(mat_struct *, mat_struct *, const double,
14  const double);
17 int G_matrix_LU_solve(const mat_struct *, mat_struct **, const mat_struct *,
18  mat_type);
22 int G_matrix_set_element(mat_struct *, int, int, double);
23 double G_matrix_get_element(mat_struct *, int, int);
24 
25 /* Matrix-vector routines corresponding to BLAS Level II */
26 
32 
33 /* Vector routines corresponding to BLAS Level I */
34 
35 vec_struct *G_vector_init(int, int, vtype);
36 int G_vector_set(vec_struct *, int, int, vtype, int);
38 double G_vector_norm_maxval(vec_struct *, int);
39 vec_struct *G_vector_copy(const vec_struct *, int);
41 
42 /* Matrix and vector routines corresponding to ?? */
43 
46 double G_vector_norm1(vec_struct *);
47 int G_matrix_read(FILE *, mat_struct *);
52 
53 #endif /* GRASS_LADEFS_H */
double G_vector_norm_euclid(vec_struct *)
Calculates euclidean norm.
Definition: la.c:1153
mat_struct * G_matrix_subtract(mat_struct *, mat_struct *)
Subtract two matricies.
Definition: la.c:197
int G_matrix_zero(mat_struct *)
Clears (or resets) the matrix values to 0.
Definition: la.c:91
int G_matrix_LU_solve(const mat_struct *, mat_struct **, const mat_struct *, mat_type)
Solve a general system A.X = B.
Definition: la.c:467
int G_matvect_retrieve_matrix(vec_struct *)
Revert a vector to matrix.
Definition: la.c:882
mat_struct * G_matrix_copy(const mat_struct *)
Copy a matrix.
Definition: la.c:146
double G_vector_norm_maxval(vec_struct *, int)
Calculates maximum value.
Definition: la.c:1199
int G_matrix_set(mat_struct *, int, int, int)
Set parameters for an initialized matrix.
Definition: la.c:116
mat_struct * G_matrix_product(mat_struct *, mat_struct *)
Returns product of two matricies.
Definition: la.c:352
mat_struct * G_matrix_resize(mat_struct *, int, int)
Resizes a matrix.
Definition: la.c:1541
void G_matrix_free(mat_struct *)
Free up allocated matrix.
Definition: la.c:642
vec_struct * G_vector_copy(const vec_struct *, int)
Returns a vector copied from vc1. Underlying structure is preserved unless DO_COMPACT flag.
Definition: la.c:1376
mat_struct * G_matrix_scalar_mul(double, mat_struct *, mat_struct *)
Calculates the scalar-matrix multiplication.
Definition: la.c:215
vec_struct * G_matvect_get_column(mat_struct *, int)
Retrieve a column of the matrix to a vector structure.
Definition: la.c:754
int G_matrix_stdin(mat_struct *)
Definition: la.c:1576
mat_struct * G_matrix_init(int, int, int)
Initialize a matrix structure.
Definition: la.c:60
double G_matrix_get_element(mat_struct *, int, int)
Retrieve value of the (i,j)th element.
Definition: la.c:732
vec_struct * G_vector_init(int, int, vtype)
Initialize a vector structure.
Definition: la.c:961
int G_matvect_extract_vector(mat_struct *, vtype, int)
Convert matrix to vector.
Definition: la.c:836
void G_vector_free(vec_struct *)
Free an allocated vector structure.
Definition: la.c:1006
vec_struct * G_matvect_product(mat_struct *, vec_struct *, vec_struct *)
Calculates the matrix-vector product.
Definition: la.c:907
int G_matrix_read(FILE *, mat_struct *)
Read a matrix from a file stream.
Definition: la.c:1488
vec_struct * G_vector_product(vec_struct *, vec_struct *, vec_struct *)
Calculates the vector product.
Definition: la.c:1308
mat_struct * G_matrix_transpose(mat_struct *)
Transpose a matrix.
Definition: la.c:401
int G_matrix_eigen_sort(vec_struct *, mat_struct *)
Sort eigenvectors according to eigenvalues.
Definition: la.c:1593
double G_vector_norm1(vec_struct *)
Calculates the 1-norm of a vector.
Definition: la.c:1270
mat_struct * G_matrix_add(mat_struct *, mat_struct *)
Adds two matricies.
Definition: la.c:179
int G_matrix_set_element(mat_struct *, int, int, double)
Definition: la.c:700
vec_struct * G_matvect_get_row(mat_struct *, int)
Retrieve a row of the matrix to a vector structure.
Definition: la.c:794
mat_struct * G__matrix_add(mat_struct *, mat_struct *, const double, const double)
Definition: la.c:279
void G_matrix_print(mat_struct *)
Print out a matrix.
Definition: la.c:661
mat_struct * G_matrix_scale(mat_struct *, const double)
Scale a matrix by a scalar value.
Definition: la.c:258
int G_vector_set(vec_struct *, int, int, vtype, int)
Definition: la.c:1104
vec_struct * G_vector_sub(vec_struct *, vec_struct *, vec_struct *)
Subtract two vectors.
Definition: la.c:1029
mat_struct * G_matrix_inverse(mat_struct *)
Returns the matrix inverse.
Definition: la.c:588
vtype
Definition: la.h:44
mat_type
Definition: la.h:42
Definition: la.h:53