GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <math.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <grass/gmath.h>
#include <grass/gis.h>
#include <grass/gisdefs.h>
Go to the source code of this file.
Macros | |
#define | EPSILON 0.00000000000000001 |
Functions | |
void | G_math_Ax_sparse (G_math_spvector **Asp, double *x, double *y, int rows) |
Compute the matrix - vector product of sparse matrix **Asp and vector x. More... | |
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 twMo 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) |
#define EPSILON 0.00000000000000001 |
Definition at line 28 of file blas_level_2.c.
Referenced by find_all_intersections(), get_diag_intersects(), get_horz_intersects(), get_vert_intersects(), and order_intersects().
void G_math_Ax_sparse | ( | G_math_spvector ** | Asp, |
double * | x, | ||
double * | y, | ||
int | rows | ||
) |
Compute the matrix - vector product of sparse matrix **Asp and vector x.
This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.
y = A * x
Asp | (G_math_spvector **) |
x | (double) *) |
y | (double * ) |
Definition at line 45 of file blas_level_2.c.
Referenced by N_les_integrate_dirichlet_2d(), and N_les_integrate_dirichlet_3d().
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 371 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 211 of file blas_level_2.c.
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 79 of file blas_level_2.c.
Referenced by N_les_integrate_dirichlet_2d(), and N_les_integrate_dirichlet_3d().
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) – lengt of vector y |
Definition at line 147 of file blas_level_2.c.
Definition at line 404 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 293 of file blas_level_2.c.
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 113 of file blas_level_2.c.
Compute the dyadic product of twMo 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) – lengt of vector y |
Definition at line 177 of file blas_level_2.c.