GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-f63024f571
la.h
Go to the documentation of this file.
1
/**
2
* \file la.h
3
*
4
* \brief Wrapper headers for BLAS/LAPACK.
5
*
6
* This program is free software under the GNU General Public License
7
* (>=v2). Read the file COPYING that comes with GRASS for details.
8
*
9
* \author David D. Gray, ddgray@armacde.demon co uk
10
* \author GRASS GIS Development Team
11
*
12
* \date 2000-2007
13
*/
14
15
#ifndef HAVE_LIBBLAS
16
#error GRASS GIS is not configured with BLAS (la.h cannot be included)
17
#endif
18
19
#ifndef HAVE_LIBLAPACK
20
#error GRASS GIS is not configured with LAPACK (la.h cannot be included)
21
#endif
22
23
#ifndef GRASS_LA_H
24
#define GRASS_LA_H
25
26
#include <
grass/config.h
>
27
#include <stdio.h>
28
29
/* Useful defines */
30
31
#define MAX_POS 1
/* Indicates maximum value */
32
#define MAX_NEG -1
/* Indicates minimum value */
33
#define MAX_ABS 0
/* Indicates absolute value */
34
35
#define DO_COMPACT 0
/* Eliminate unnecessary rows (cols) in matrix */
36
#define NO_COMPACT 1
/* ... or not */
37
38
/* Operations should know type of coefficient matrix, so that
39
they can call the right driver
40
*/
41
42
typedef
enum
{
NONSYM
,
SYM
,
HERMITIAN
}
mat_type
;
43
typedef
enum
{
MATRIX_
,
ROWVEC_
,
COLVEC_
}
mat_spec
;
44
typedef
enum
{
RVEC
,
CVEC
}
vtype
;
45
46
/************************************************************
47
* *
48
* A general matrix wrapper for use with BLAS / LAPACK *
49
* routines, and perhaps elsewhere *
50
* *
51
************************************************************/
52
53
typedef
struct
matrix_
{
54
55
mat_spec
type
;
/* matrix, row vector or column vector? */
56
int
v_indx
;
/* If a vector, which row(column) is active?
57
* If a matrix this is ignored. If value is < 0,
58
* the first row(column) is assumed, ie. index 0. */
59
int
rows
,
cols
;
/* Rows and columns of matrix */
60
int
ldim
;
/* Lead dimension of matrix. How many `rows' are
61
* alloc'ed? May exceed real number of rows `rows' */
62
double
*
vals
;
/* The values (should be dimensioned to lda * cols */
63
int
is_init
;
/* Is matrix initialised: values array
64
* is allocated and parameters set ? */
65
}
mat_struct
;
66
67
typedef
mat_struct
vec_struct
;
68
69
#include <
grass/defs/la.h
>
70
71
#endif
/* GRASS_LA_H */
config.h
la.h
vtype
vtype
Definition:
la.h:44
CVEC
@ CVEC
Definition:
la.h:44
RVEC
@ RVEC
Definition:
la.h:44
vec_struct
mat_struct vec_struct
Definition:
la.h:67
mat_type
mat_type
Definition:
la.h:42
SYM
@ SYM
Definition:
la.h:42
NONSYM
@ NONSYM
Definition:
la.h:42
HERMITIAN
@ HERMITIAN
Definition:
la.h:42
mat_struct
struct matrix_ mat_struct
mat_spec
mat_spec
Definition:
la.h:43
COLVEC_
@ COLVEC_
Definition:
la.h:43
MATRIX_
@ MATRIX_
Definition:
la.h:43
ROWVEC_
@ ROWVEC_
Definition:
la.h:43
matrix_
Definition:
la.h:53
matrix_::v_indx
int v_indx
Definition:
la.h:56
matrix_::type
mat_spec type
Definition:
la.h:55
matrix_::rows
int rows
Definition:
la.h:59
matrix_::is_init
int is_init
Definition:
la.h:63
matrix_::ldim
int ldim
Definition:
la.h:60
matrix_::vals
double * vals
Definition:
la.h:62
matrix_::cols
int cols
Definition:
la.h:59
include
grass
la.h
Generated on Fri Nov 22 2024 07:03:24 for GRASS GIS 8 Programmer's Manual by
1.9.1