GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
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 
26 /* Matrix-vector routines corresponding to BLAS Level II */
27 
33 
34 
35 /* Vector routines corresponding to BLAS Level I */
36 
37 vec_struct *G_vector_init(int, int, vtype);
38 int G_vector_set(vec_struct *, int, int, vtype, int);
40 double G_vector_norm_maxval(vec_struct *, int);
41 vec_struct *G_vector_copy(const vec_struct *, int);
43 
44 /* Matrix and vector routines corresponding to ?? */
45 
48 double G_vector_norm1(vec_struct *);
49 int G_matrix_read(FILE *, mat_struct *);
54 
55 #endif /* GRASS_LADEFS_H */
vtype
Definition: la.h:130
int G_vector_set(vec_struct *, int, int, vtype, int)
Set parameters for vector structure.
Definition: la.c:1139
double G_matrix_get_element(mat_struct *, int, int)
Retrieve value of the (i,j)th element.
Definition: la.c:759
mat_struct * G__matrix_add(mat_struct *, mat_struct *, const double, const double)
General add/subtract/scalar multiply routine.
Definition: la.c:278
int G_matvect_retrieve_matrix(vec_struct *)
Revert a vector to matrix.
Definition: la.c:916
void G_vector_free(vec_struct *)
Free an allocated vector structure.
Definition: la.c:1042
vec_struct * G_matvect_get_column(mat_struct *, int)
Retrieve a column of the matrix to a vector structure.
Definition: la.c:782
mat_struct * G_matrix_transpose(mat_struct *)
Transpose a matrix.
Definition: la.c:410
double G_vector_norm1(vec_struct *)
Calculates the 1-norm of a vector.
Definition: la.c:1318
int G_matrix_stdin(mat_struct *)
Definition: la.c:1630
int G_matvect_extract_vector(mat_struct *, vtype, int)
Convert matrix to vector.
Definition: la.c:866
vec_struct * G_matvect_product(mat_struct *, vec_struct *, vec_struct *)
Calculates the matrix-vector product.
Definition: la.c:941
Definition: la.h:141
mat_struct * G_matrix_subtract(mat_struct *, mat_struct *)
Subtract two matricies.
Definition: la.c:197
mat_struct * G_matrix_scalar_mul(double, mat_struct *, mat_struct *)
Calculates the scalar-matrix multiplication.
Definition: la.c:214
mat_type
Definition: la.h:126
mat_struct * G_matrix_resize(mat_struct *, int, int)
Resizes a matrix.
Definition: la.c:1596
mat_struct * G_matrix_inverse(mat_struct *)
Returns the matrix inverse.
Definition: la.c:608
double G_vector_norm_euclid(vec_struct *)
Calculates euclidean norm.
Definition: la.c:1192
int G_matrix_eigen_sort(vec_struct *, mat_struct *)
Sort eigenvectors according to eigenvalues.
Definition: la.c:1648
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:480
mat_struct * G_matrix_init(int, int, int)
Initialize a matrix structure.
Definition: la.c:56
int G_matrix_set_element(mat_struct *, int, int, double)
Set the value of the (i, j)th element.
Definition: la.c:726
int G_matrix_zero(mat_struct *)
Clears (or resets) the matrix values to 0.
Definition: la.c:88
mat_struct * G_matrix_copy(const mat_struct *)
Copy a matrix.
Definition: la.c:145
mat_struct * G_matrix_add(mat_struct *, mat_struct *)
Adds two matricies.
Definition: la.c:178
vec_struct * G_vector_product(vec_struct *, vec_struct *, vec_struct *)
Calculates the vector product.
Definition: la.c:1355
mat_struct * G_matrix_product(mat_struct *, mat_struct *)
Returns product of two matricies.
Definition: la.c:356
int G_matrix_read(FILE *, mat_struct *)
Read a matrix from a file stream.
Definition: la.c:1542
vec_struct * G_matvect_get_row(mat_struct *, int)
Retrieve a row of the matrix to a vector structure.
Definition: la.c:823
vec_struct * G_vector_init(int, int, vtype)
Initialize a vector structure.
Definition: la.c:995
void G_matrix_free(mat_struct *)
Free up allocated matrix.
Definition: la.c:667
vec_struct * G_vector_sub(vec_struct *, vec_struct *, vec_struct *)
Subtract two vectors.
Definition: la.c:1065
double G_vector_norm_maxval(vec_struct *, int)
Calculates maximum value.
Definition: la.c:1243
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:1429
mat_struct * G_matrix_scale(mat_struct *, const double)
Scale a matrix by a scalar value.
Definition: la.c:257
int G_matrix_set(mat_struct *, int, int, int)
Set parameters for an initialized matrix.
Definition: la.c:114
void G_matrix_print(mat_struct *)
Print out a matrix.
Definition: la.c:687