xmsgrid
1.0
|
routines for manipulating matrices More...
#include <xmsgrid/matrices/matrix.h>
#include <cmath>
#include <xmscore/points/pt.h>
#include <xmscore/misc/XmLog.h>
#include <xmscore/misc/xmstype.h>
Go to the source code of this file.
Namespaces | |
xms | |
XMS Namespace. | |
Functions | |
int | xms::mxLUDecomp (double **mat, int n, int *indx, double *d) |
Decompose an n x n matrix into Upper & Lower trianglar (in place), from "Numerical Recipes in C" p 43. More... | |
int | xms::mxLUBcksub (double **mat, int n, const int *indx, double *b) |
solve [mat]{x} = {b} by back substitution (mat = LU of mat), from "Numerical Recipes in C" p 44. More... | |
bool | xms::mxiLudcmp3 (double mat[3][3], int indx[3], double *d) |
Decomposes a 3 x 3 matrix into Upper & Lower trianglar(in place) More... | |
void | xms::mxiLubksb3 (const double mat[3][3], const int indx[3], double b[3]) |
solve [mat]{x} = {b} by back substitution (mat = LU of mat) More... | |
bool | xms::mxSolveNxN (double **A, double *x, double *b, int n) |
Solves the matrix equation [A]*{x}={b} for {x} where [A] is NxN and {x} and {b} are Nx1 vectors. The matrix A is replaced with the LU decomposition of A. More... | |
bool | xms::mxSolveBandedEquations (double **a, double *x, double *b, int numeqs, int halfbandwidth) |
Solves the matrix equation [a][x]=[b] using gauss elimination. More... | |
bool | xms::mxSolve3x3 (double A[3][3], double x[3], double b[3]) |
Solves the matrix equation [A]*{x}={b} for {x} where [A] is 3x3 and {x} and {b} are 3x1 vectors. More... | |
int | xms::mxInvert4x4 (const double matrix[4][4], double inv[4][4]) |
Compute the inverse of a transformation matrix. Checks for special case of Orthogonal 4x4 and does easy inverse otherwise uses Gauss-Jordan Elimination with full pivoting and scaling with partial unraveling of loops for speed. See Numerical Recipes in C pages 36-37. More... | |
void | xms::mxPointMult (Pt3d *pt, const double ctm[4][4]) |
Multiplies a point by a transformation matrix. More... | |
void | xms::mxCopy4x4 (double copy[4][4], const double matrix[4][4]) |
Copy a transformation matrix. Simply uses memcpy. More... | |
void | xms::mxIdent4x4 (double matrix[4][4]) |
Sets a transformation matrix to identity. More... | |
void | xms::mxMult4x4 (double product[4][4], const double matrix1[4][4], const double matrix2[4][4]) |
Multiplies two transformation matrices. More... | |
void | xms::mxRotate4x4 (double xrot, double yrot, double zrot, double rMatt[4][4]) |
return a rotation matrix with specified x, y, z rotations z - y - x order More... | |
void | xms::mxTranslate4x4 (const Pt3d &a_translation, double a_mx[4][4]) |
return a translation matrix with specified translation z - y - x order More... | |
routines for manipulating matrices
The routines in this file come from "Numerical Recipes in C" by Press et al. important: to use these routines properly, the matrices and vectors should be declared as pointers and initialized from [1..n] using the routines defined in this file.
Definition in file matrix.cpp.