sp_matrix.h File Reference

Go to the source code of this file.

Classes

struct  BMAT
struct  MATRIX
struct  VECTOR

Defines

#define DOF   (3)
#define FIRST(b)   ((b).mat[0])
#define M_COMPAT_DIM(m, n)   ((m).cols == (n).rows)
#define M_EQUAL_DIM(m, n)   (((m).rows == (n).rows) && ((m).cols == (n).cols))
#define M_SQUARE(m)   ((m).rows == (m).cols)
#define MAX_COLS   (7)
#define MAX_ROWS   (7)
#define MCOLS(m)   ((m).cols)
#define MDATA(m, i, j)   ((m).data[i][j])
#define MROWS(m)   ((m).rows)
#define MV_COMPAT_DIM(m, v)   ((m).cols == (v).elements)
#define RANGE(b)   ((b).range)
#define SECOND(b)   ((b).mat[1])
#define SQUARE(x)   ((x)*(x))
#define THIRD(b)   ((b).mat[2])
#define V_EQUAL_DIM(v, w)   (((v).elements == (w).elements))
#define VDATA(v, i)   ((v).data[i])
#define VELEMENTS(v)   ((v).elements)

Functions

MATRIX create_matrix (int rows, int cols)
VECTOR create_vector (int elements)
float cross_product (MATRIX const *m, int f1, int c1, int f2, int c2)
int determinant (MATRIX const *m, float *result)
void diagonal_matrix (MATRIX *m, int dim, float el1, float el2, float el3)
void initialize_matrix (MATRIX *m, int rows, int cols)
void initialize_vector (VECTOR *v, int elements)
int inverse_matrix (MATRIX const *m, MATRIX *n)
int multiply_matrix_vector (MATRIX const *m, VECTOR const *v, VECTOR *r)
void print_matrix (char *message, MATRIX const *m)
void print_vector (char *message, VECTOR const *v)

Define Documentation

#define DOF   (3)

Definition at line 32 of file sp_matrix.h.

#define FIRST (  )     ((b).mat[0])

Definition at line 52 of file sp_matrix.h.

#define M_COMPAT_DIM ( m,
 )     ((m).cols == (n).rows)

Definition at line 47 of file sp_matrix.h.

#define M_EQUAL_DIM ( m,
 )     (((m).rows == (n).rows) && ((m).cols == (n).cols))

Definition at line 48 of file sp_matrix.h.

#define M_SQUARE (  )     ((m).rows == (m).cols)

Definition at line 46 of file sp_matrix.h.

#define MAX_COLS   (7)

Definition at line 19 of file sp_matrix.h.

#define MAX_ROWS   (7)

Definition at line 18 of file sp_matrix.h.

#define MCOLS (  )     ((m).cols)

Definition at line 40 of file sp_matrix.h.

#define MDATA ( m,
i,
 )     ((m).data[i][j])

Definition at line 41 of file sp_matrix.h.

#define MROWS (  )     ((m).rows)

Definition at line 39 of file sp_matrix.h.

#define MV_COMPAT_DIM ( m,
 )     ((m).cols == (v).elements)

Definition at line 50 of file sp_matrix.h.

#define RANGE (  )     ((b).range)

Definition at line 55 of file sp_matrix.h.

#define SECOND (  )     ((b).mat[1])

Definition at line 53 of file sp_matrix.h.

#define SQUARE (  )     ((x)*(x))

Definition at line 57 of file sp_matrix.h.

#define THIRD (  )     ((b).mat[2])

Definition at line 54 of file sp_matrix.h.

#define V_EQUAL_DIM ( v,
 )     (((v).elements == (w).elements))

Definition at line 49 of file sp_matrix.h.

#define VDATA ( v,
 )     ((v).data[i])

Definition at line 44 of file sp_matrix.h.

#define VELEMENTS (  )     ((v).elements)

Definition at line 43 of file sp_matrix.h.


Function Documentation

MATRIX create_matrix ( int  rows,
int  cols 
)
VECTOR create_vector ( int  elements  ) 
float cross_product ( MATRIX const *  m,
int  f1,
int  c1,
int  f2,
int  c2 
)
int determinant ( MATRIX const *  m,
float *  result 
)
void diagonal_matrix ( MATRIX m,
int  dim,
float  el1,
float  el2,
float  el3 
)
void initialize_matrix ( MATRIX m,
int  rows,
int  cols 
)
void initialize_vector ( VECTOR v,
int  elements 
)
int inverse_matrix ( MATRIX const *  m,
MATRIX n 
)
int multiply_matrix_vector ( MATRIX const *  m,
VECTOR const *  v,
VECTOR r 
)
void print_matrix ( char *  message,
MATRIX const *  m 
)
void print_vector ( char *  message,
VECTOR const *  v 
)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines


csm
Author(s): Ivan Dryanovski, William Morris
autogenerated on Fri Jan 11 09:16:00 2013