GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-1d42e580e2
|
#include <math.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <grass/gmath.h>
#include <grass/gis.h>
Go to the source code of this file.
Macros | |
#define | EPSILON 0.00000000000000001 |
Functions | |
void | G_math_d_Ax (double **A, double *x, double *y, int rows, int cols) |
Compute the matrix - vector product of matrix A and vector x. More... | |
void | G_math_f_Ax (float **A, float *x, float *y, int rows, int cols) |
Compute the matrix - vector product of matrix A and vector x. More... | |
void | G_math_d_x_dyad_y (double *x, double *y, double **A, int rows, int cols) |
Compute the dyadic product of two vectors. The result is stored in the matrix A. More... | |
void | G_math_f_x_dyad_y (float *x, float *y, float **A, int rows, int cols) |
Compute the dyadic product of two vectors. The result is stored in the matrix A. More... | |
void | G_math_d_aAx_by (double **A, double *x, double *y, double a, double b, double *z, int rows, int cols) |
Compute the scaled matrix - vector product of matrix double **A and vector x and y. More... | |
void | G_math_f_aAx_by (float **A, float *x, float *y, float a, float b, float *z, int rows, int cols) |
Compute the scaled matrix - vector product of matrix A and vectors x and y. More... | |
int | G_math_d_A_T (double **A, int rows) |
Compute the transposition of matrix A. Matrix A will be overwritten. More... | |
int | G_math_f_A_T (float **A, int rows) |
Compute the transposition of matrix A. Matrix A will be overwritten. More... | |
#define EPSILON 0.00000000000000001 |
Definition at line 26 of file blas_level_2.c.
int G_math_d_A_T | ( | double ** | A, |
int | rows | ||
) |
Compute the transposition of matrix A. Matrix A will be overwritten.
This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.
Returns 0.
A | (double **) |
rows | (int) |
Definition at line 342 of file blas_level_2.c.
void G_math_d_aAx_by | ( | double ** | A, |
double * | x, | ||
double * | y, | ||
double | a, | ||
double | b, | ||
double * | z, | ||
int | rows, | ||
int | cols | ||
) |
Compute the scaled matrix - vector product of matrix double **A and vector x and y.
z = a * A * x + b * y
This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.
A | (double **) |
x | (double *) |
y | (double *) |
a | (double) |
b | (double) |
z | (double *) |
rows | (int) |
cols | (int) |
Definition at line 182 of file blas_level_2.c.
void G_math_d_Ax | ( | double ** | A, |
double * | x, | ||
double * | y, | ||
int | rows, | ||
int | cols | ||
) |
Compute the matrix - vector product of matrix A and vector x.
This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.
y = A * x
A | (double ** ) |
x | (double *) |
y | (double *) |
rows | (int) |
cols | (int) |
Definition at line 46 of file blas_level_2.c.
Referenced by N_les_integrate_dirichlet_2d(), and N_les_integrate_dirichlet_3d().
void G_math_d_x_dyad_y | ( | double * | x, |
double * | y, | ||
double ** | A, | ||
int | rows, | ||
int | cols | ||
) |
Compute the dyadic product of two vectors. The result is stored in the matrix A.
This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.
A = x * y^T
x | (double *) |
y | (double *) |
A | (float **) – matrix of size rows*cols |
rows | (int) – length of vector x |
cols | (int) – length of vector y |
Definition at line 116 of file blas_level_2.c.
int G_math_f_A_T | ( | float ** | A, |
int | rows | ||
) |
Compute the transposition of matrix A. Matrix A will be overwritten.
This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.
Returns 0.
A | (float **) |
rows | (int) |
Definition at line 376 of file blas_level_2.c.
void G_math_f_aAx_by | ( | float ** | A, |
float * | x, | ||
float * | y, | ||
float | a, | ||
float | b, | ||
float * | z, | ||
int | rows, | ||
int | cols | ||
) |
Compute the scaled matrix - vector product of matrix A and vectors x and y.
z = a * A * x + b * y
This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.
A | (float **) |
x | (float *) |
y | (float *) |
a | (float) |
b | (float) |
z | (float *) |
rows | (int) |
cols | (int) |
Definition at line 265 of file blas_level_2.c.
void G_math_f_Ax | ( | float ** | A, |
float * | x, | ||
float * | y, | ||
int | rows, | ||
int | cols | ||
) |
Compute the matrix - vector product of matrix A and vector x.
This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.
y = A * x
A | (float ** ) |
x | (float *) |
y | (float *) |
rows | (int) |
cols | (int) |
Definition at line 81 of file blas_level_2.c.
void G_math_f_x_dyad_y | ( | float * | x, |
float * | y, | ||
float ** | A, | ||
int | rows, | ||
int | cols | ||
) |
Compute the dyadic product of two vectors. The result is stored in the matrix A.
This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.
A = x * y^T
x | (float *) |
y | (float *) |
A | (float **= – matrix of size rows*cols |
rows | (int) – length of vector x |
cols | (int) – length of vector y |
Definition at line 147 of file blas_level_2.c.