GRASS GIS 8 Programmer's Manual  8.4.0dev(2024)-2653d7b383
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:1167
mat_struct * G_matrix_subtract(mat_struct *, mat_struct *)
Subtract two matricies.
Definition: la.c:189
int G_matrix_zero(mat_struct *)
Clears (or resets) the matrix values to 0.
Definition: la.c:84
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:468
int G_matvect_retrieve_matrix(vec_struct *)
Revert a vector to matrix.
Definition: la.c:893
mat_struct * G_matrix_copy(const mat_struct *)
Copy a matrix.
Definition: la.c:139
double G_vector_norm_maxval(vec_struct *, int)
Calculates maximum value.
Definition: la.c:1217
int G_matrix_set(mat_struct *, int, int, int)
Set parameters for an initialized matrix.
Definition: la.c:109
mat_struct * G_matrix_product(mat_struct *, mat_struct *)
Returns product of two matricies.
Definition: la.c:346
mat_struct * G_matrix_resize(mat_struct *, int, int)
Resizes a matrix.
Definition: la.c:1563
void G_matrix_free(mat_struct *)
Free up allocated matrix.
Definition: la.c:653
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:1398
mat_struct * G_matrix_scalar_mul(double, mat_struct *, mat_struct *)
Calculates the scalar-matrix multiplication.
Definition: la.c:207
vec_struct * G_matvect_get_column(mat_struct *, int)
Retrieve a column of the matrix to a vector structure.
Definition: la.c:765
int G_matrix_stdin(mat_struct *)
Definition: la.c:1598
mat_struct * G_matrix_init(int, int, int)
Initialize a matrix structure.
Definition: la.c:53
double G_matrix_get_element(mat_struct *, int, int)
Retrieve value of the (i,j)th element.
Definition: la.c:743
vec_struct * G_vector_init(int, int, vtype)
Initialize a vector structure.
Definition: la.c:972
int G_matvect_extract_vector(mat_struct *, vtype, int)
Convert matrix to vector.
Definition: la.c:847
void G_vector_free(vec_struct *)
Free an allocated vector structure.
Definition: la.c:1018
vec_struct * G_matvect_product(mat_struct *, vec_struct *, vec_struct *)
Calculates the matrix-vector product.
Definition: la.c:918
int G_matrix_read(FILE *, mat_struct *)
Read a matrix from a file stream.
Definition: la.c:1510
vec_struct * G_vector_product(vec_struct *, vec_struct *, vec_struct *)
Calculates the vector product.
Definition: la.c:1326
mat_struct * G_matrix_transpose(mat_struct *)
Transpose a matrix.
Definition: la.c:400
int G_matrix_eigen_sort(vec_struct *, mat_struct *)
Sort eigenvectors according to eigenvalues.
Definition: la.c:1615
double G_vector_norm1(vec_struct *)
Calculates the 1-norm of a vector.
Definition: la.c:1288
mat_struct * G_matrix_add(mat_struct *, mat_struct *)
Adds two matricies.
Definition: la.c:171
int G_matrix_set_element(mat_struct *, int, int, double)
Definition: la.c:711
vec_struct * G_matvect_get_row(mat_struct *, int)
Retrieve a row of the matrix to a vector structure.
Definition: la.c:805
mat_struct * G__matrix_add(mat_struct *, mat_struct *, const double, const double)
Definition: la.c:271
void G_matrix_print(mat_struct *)
Print out a matrix.
Definition: la.c:672
mat_struct * G_matrix_scale(mat_struct *, const double)
Scale a matrix by a scalar value.
Definition: la.c:250
int G_vector_set(vec_struct *, int, int, vtype, int)
Definition: la.c:1116
vec_struct * G_vector_sub(vec_struct *, vec_struct *, vec_struct *)
Subtract two vectors.
Definition: la.c:1041
mat_struct * G_matrix_inverse(mat_struct *)
Returns the matrix inverse.
Definition: la.c:595
vtype
Definition: la.h:124
mat_type
Definition: la.h:122
Definition: la.h:133