#include <dvm3/dvm3_matrix.h>
Public Member Functions | |
~dvm3_Matrix () | |
dvm3_Matrix () | |
dvm3_Matrix (dvm3_Matrix const &m) | |
dvm3_Matrix (dvm3_Vector const &x, dvm3_Vector const &y, dvm3_Vector const &z) | |
dvm3_Matrix (double const x[], double const y[], double const z[]) | |
void | init_by_row (dvm3_Vector const &v1, dvm3_Vector const &v2, dvm3_Vector const &v3) |
void | init_by_row (double const v1[], double const v2[], double const v3[]) |
void | init_by_col (dvm3_Vector const &v1, dvm3_Vector const &v2, dvm3_Vector const &v3) |
void | init_by_col (double const v1[], double const v2[], double const v3[]) |
double const * | operator[] (int i) const |
double * | operator[] (int i) |
double | operator() (int i, int j) const |
double & | operator() (int i, int j) |
dvm3_Matrix & | operator= (dvm3_Matrix const &rhs) |
dvm3_Matrix & | operator= (double rhs) |
dvm3_Matrix & | operator+= (dvm3_Matrix const &rhs) |
dvm3_Matrix & | operator-= (dvm3_Matrix const &rhs) |
dvm3_Matrix & | operator*= (dvm3_Matrix const &rhs) |
dvm3_Matrix & | operator/= (dvm3_Matrix const &rhs) |
dvm3_Matrix & | operator+= (double rhs) |
dvm3_Matrix & | operator-= (double rhs) |
dvm3_Matrix & | operator*= (double rhs) |
dvm3_Matrix & | operator/= (double rhs) |
dvm3_Matrix & | operator+ () |
dvm3_Matrix & | operator- () |
void | inject_row (int whichrow, dvm3_Vector const &new_row) |
void | inject_row (int whichrow, double const new_row[]) |
void | inject_col (int whichcol, dvm3_Vector const &col) |
void | inject_col (int whichcol, double const col[]) |
void | extract_row (int whichrow, dvm3_Vector &row) const |
void | extract_row (int whichrow, double row[]) const |
void | extract_col (int whichcol, dvm3_Vector &col) const |
void | extract_col (int whichcol, double *col) const |
void | dyad_product (dvm3_Vector const &v1, dvm3_Vector const &v2) |
void | dyad_product (double const v1[], double const v2[]) |
void | lincomb (double c1, dvm3_Matrix const &m1, double c2, dvm3_Matrix const &m2) |
void | mvmult (dvm3_Vector &result, dvm3_Vector const &v) const |
void | mvmult (double result[], double const v[]) const |
void | mtvmult (dvm3_Vector &result, dvm3_Vector const &v) const |
void | mtvmult (double result[], double const v[]) const |
void | mmult (dvm3_Matrix const &m1, dvm3_Matrix const &m2) |
std::ostream & | print_on (std::ostream &os, char const pre[]="", char const post[]="") const |
void | cprint_on (FILE *os, char const prefix[]="", char const postfix[]="") |
void | orthonormalize () |
Protected Types | |
enum | ENelts_ { ENelts = 9 } |
enum | ERowOffset_ { ERow0 = 0, ERow1 = 3, ERow2 = 6 } |
enum | EColStride_ { EColStride = 3 } |
Protected Attributes | |
dvm3_MPOD | data_ |
Friends | |
std::ostream & | operator<< (std::ostream &os, dvm3_Matrix const &) |
void | dyad_product (dvm3_Matrix &result, dvm3_Vector const &v1, dvm3_Vector const &v2) |
void | dyad_product (dvm3_Matrix &result, double const v1[], double const v2[]) |
void | lincomb (dvm3_Matrix &result, double c1, dvm3_Matrix const &m1, double c2, dvm3_Matrix const &m2) |
void | mvmult (dvm3_Vector &result, dvm3_Matrix const &m, dvm3_Vector const &v) |
void | mvmult (double result[], dvm3_Matrix const &m, double const v[]) |
void | mtvmult (dvm3_Vector &result, dvm3_Matrix const &m, dvm3_Vector const &v) |
void | mtvmult (double result[], dvm3_Matrix const &m, double const v[]) |
void | mmult (dvm3_Matrix &result, dvm3_Matrix const &m1, dvm3_Matrix const &m2) |
dvm3_Matrix | operator+ (dvm3_Matrix const &m1, dvm3_Matrix const &m2) |
dvm3_Matrix | operator- (dvm3_Matrix const &m1, dvm3_Matrix const &m2) |
dvm3_Matrix | operator* (dvm3_Matrix const &m1, dvm3_Matrix const &m2) |
dvm3_Matrix | operator/ (dvm3_Matrix const &m1, dvm3_Matrix const &m2) |
dvm3_Matrix | operator+ (double d, dvm3_Matrix const &m) |
dvm3_Matrix | operator- (double d, dvm3_Matrix const &m) |
dvm3_Matrix | operator* (double d, dvm3_Matrix const &m) |
dvm3_Matrix | operator/ (double d, dvm3_Matrix const &m) |
dvm3_Matrix | operator+ (dvm3_Matrix const &m, double d) |
dvm3_Matrix | operator- (dvm3_Matrix const &m, double d) |
dvm3_Matrix | operator* (dvm3_Matrix const &m, double d) |
dvm3_Matrix | operator/ (dvm3_Matrix const &m, double d) |
v1 * v2 = { v1[0] * v2[0], v1[1] * v2[1], v1[2] * v2[2] }
This is intended as a small component which can be inexpensively created on the stack; the constructors and destructor do not make use of dynamic allocation. The dvm3_Matrix default constructor does not initialize the memory.
dvm3_Matrix works on any of these representations of 3-vectors:
NOTE: although dvm3_Matrix works with either of the above two vector types, the SAME vector type must be used for ALL occurrences within any given method call.
Definition at line 104 of file dvm3_matrix.h.