MercuryDPM
Beta
|
Implementation of a 3D matrix. More...
#include <Matrix.h>
Public Member Functions | |
Matrix3D () | |
default constructor More... | |
Matrix3D (const Mdouble xx, const Mdouble xy, const Mdouble xz, const Mdouble yx, const Mdouble yy, const Mdouble yz, const Mdouble zx, const Mdouble zy, const Mdouble zz) | |
Alternative constructor, which let you define all elements. More... | |
void | setZero () |
Sets all elements to zero. More... | |
double | trace () const |
Mean of the diagonal elements. More... | |
Matrix3D | operator+ (const Matrix3D &A) const |
Matrix addition. More... | |
Matrix3D | operator- (const Matrix3D &A) const |
Matrix subtraction. More... | |
Matrix3D | operator+ (const Mdouble a) const |
Scalar addition. More... | |
Matrix3D | operator- (const Mdouble a) const |
Scalar subtraction. More... | |
Matrix3D | operator* (const Mdouble a) const |
Scalar multiplication. More... | |
Vec3D | operator* (const Vec3D &a) const |
Vector multiplication. More... | |
Matrix3D | operator* (const Matrix3D &a) const |
Matrix multiplication. More... | |
Matrix3D | operator/ (const Mdouble a) const |
Scalar division. More... | |
Matrix3D & | operator+= (const Matrix3D &A) |
Matrix addition. More... | |
Matrix3D & | operator-= (const Matrix3D &A) |
Matrix substraction. More... | |
Matrix3D & | operator/= (const Mdouble a) |
Scalar division. More... | |
Static Public Member Functions | |
static Matrix3D | square (const Matrix3D &A) |
Calculates the pointwise square. More... | |
static Matrix3D | sqrt (const Matrix3D &A) |
Calculates the pointwise square root. More... | |
static Matrix3D | dyadic (const Vec3D &a, const Vec3D &b) |
Calculates the dyadic product of a two Vec3D: \(a \otimes b\). More... | |
static Matrix3D | cross (const Vec3D &a, const Matrix3D &b) |
'Special' cross product; CP of vector with each column of a matrix More... | |
Public Attributes | |
Mdouble | XX |
all nine matrix elements More... | |
Mdouble | XY |
Mdouble | XZ |
Mdouble | YX |
Mdouble | YY |
Mdouble | YZ |
Mdouble | ZX |
Mdouble | ZY |
Mdouble | ZZ |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Matrix3D &A) |
Add elements to ostream. More... | |
std::istream & | operator>> (std::istream &is, Matrix3D &A) |
Add elements to istream. More... | |
Matrix3D::Matrix3D | ( | ) |
default constructor
default constructor, which is empty (i.e., only creates the object)
Definition at line 32 of file Matrix.cc.
Referenced by cross(), dyadic(), operator*(), operator+(), operator-(), operator/(), sqrt(), and square().
Matrix3D::Matrix3D | ( | const Mdouble | xx, |
const Mdouble | xy, | ||
const Mdouble | xz, | ||
const Mdouble | yx, | ||
const Mdouble | yy, | ||
const Mdouble | yz, | ||
const Mdouble | zx, | ||
const Mdouble | zy, | ||
const Mdouble | zz | ||
) |
Alternative constructor, which let you define all elements.
Alternative constructor. Let's you specify ALL 9 elements of the 3x3 matrix.
[in] | [all] | xx/xy/xz /yx/yy/yz /zx/zy/zz are all nine elements (left-to-right, top-to-bottom) of the 3D matrix. |
Definition at line 42 of file Matrix.cc.
References XX, XY, XZ, YX, YY, YZ, ZX, ZY, and ZZ.
'Special' cross product; CP of vector with each column of a matrix
Returns a matrix, who's columns are the inner product of a given vector with the corresponding columns of a given matrix
[in] | a | vector |
[in] | B | matrix |
Definition at line 299 of file Matrix.cc.
References Matrix3D(), Vec3D::X, XX, XY, XZ, Vec3D::Y, YX, YY, YZ, Vec3D::Z, ZX, ZY, and ZZ.
void Matrix3D::setZero | ( | ) |
Mdouble Matrix3D::trace | ( | ) | const |
|
friend |
|
friend |
Mdouble Matrix3D::XX |
all nine matrix elements
Definition at line 42 of file Matrix.h.
Referenced by cross(), Matrix3D(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), setZero(), sqrt(), square(), and trace().
Mdouble Matrix3D::XY |
Definition at line 42 of file Matrix.h.
Referenced by cross(), Matrix3D(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), setZero(), sqrt(), and square().
Mdouble Matrix3D::XZ |
Definition at line 42 of file Matrix.h.
Referenced by cross(), Matrix3D(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), setZero(), sqrt(), and square().
Mdouble Matrix3D::YX |
Definition at line 42 of file Matrix.h.
Referenced by cross(), Matrix3D(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), setZero(), sqrt(), and square().
Mdouble Matrix3D::YY |
Definition at line 42 of file Matrix.h.
Referenced by cross(), Matrix3D(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), setZero(), sqrt(), square(), and trace().
Mdouble Matrix3D::YZ |
Definition at line 42 of file Matrix.h.
Referenced by cross(), Matrix3D(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), setZero(), sqrt(), and square().
Mdouble Matrix3D::ZX |
Definition at line 42 of file Matrix.h.
Referenced by cross(), Matrix3D(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), setZero(), sqrt(), and square().
Mdouble Matrix3D::ZY |
Definition at line 42 of file Matrix.h.
Referenced by cross(), Matrix3D(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), setZero(), sqrt(), and square().
Mdouble Matrix3D::ZZ |
Definition at line 42 of file Matrix.h.
Referenced by cross(), Matrix3D(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), setZero(), sqrt(), square(), and trace().