NAME
Matrix - KJB library matrix type
SYNOPSIS
#include "m/m_matrix.h"
Example compile flags (system dependent):
-DLINUX_386 -DLINUX_386_P4
-I/home/kobus/include
-L/home/kobus/load/linux_386_p4 -L/usr/local/lib -L/usr/lib
-lKJB -llapack -lblas -lg2c -lXext -lX11
typedef struct Matrix
{
int num_rows;
int num_cols;
double **elements;
int max_num_elements;
int max_num_rows;
int max_num_cols;
}
Matrix;
PARAMETERS
-
int num_rows
-
Current number of rows from the callers point of view.
-
int num_cols
-
Current number of cols from the callers point of view.
-
double **elements
-
A pointer to row pointers.
-
int max_num_elements
-
Private: The number of elements that can be stored.
-
int max_num_rows
-
Private: The number of rows that we have pointers for.
-
int max_num_cols
-
Private: The current wrapping count.
DESCRIPTION
This type is the matrix type for the KJB library and is used by many
routines. It stores a matrix with num_rows rows and num_cols cols. If "mp"
is a pointer to the type Matrix, then mp->elements[ row ][ col ] accesses
the element (row, col), and mp->elements[ row ] accesses the row'th row.
Note that counting starts at 0. The elements of the matrix are doubles.
The matrix rows may or may not be stored consecutively in memory. Because of
this, and because some routines may (most don't) take advantage of knowlege
of the internal structure for performance, it is important NOT to swap rows
by swapping pointers -- the elements should be copied.
WARNING
As described above, the user of this library must take care with
assumptions about the structure of the array embedded in the matrix type.
SEEALSO
get_target_matrix, free_matrix
matrices, data types
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTOR
Kobus Barnard
SEE ALSO
get_zero_matrix
,
create_identity_matrix