Workspace 6.21.5
Public Member Functions | Static Public Member Functions | Related Functions | List of all members
Matrix3x3 Class Reference

3x3 matrix class meant for compute-intensive use

#include <Mesh/Geometry/matrix3x3.h>

Public Member Functions

 Matrix3x3 ()
 
 Matrix3x3 (const Matrix3x3 &m)
 
 Matrix3x3 (double d00, double d01, double d02, double d10, double d11, double d12, double d20, double d21, double d22)
 
double determinant () const
 
double & operator() (int row, int column)
 
double operator() (int row, int column) const
 
Matrix3x3operator*= (double f)
 
Matrix3x3operator+= (const Matrix3x3 &m)
 
Matrix3x3operator-= (const Matrix3x3 &m)
 
Matrix3x3operator/= (double f)
 
Matrix3x3operator= (const Matrix3x3 &m)
 
double trace () const
 
Matrix3x3 transpose () const
 

Static Public Member Functions

static Matrix3x3 identity ()
 

Related Functions

(Note that these are not member functions.)

double innerProduct (const Matrix3x3 &mA, const Matrix3x3 &mB)
 
bool operator!= (const Matrix3x3 &mA, const Matrix3x3 &mB)
 
Matrix3x3 operator+ (const Matrix3x3 &mA, const Matrix3x3 &mB)
 
Matrix3x3 operator- (const Matrix3x3 &m)
 
Matrix3x3 operator- (const Matrix3x3 &mA, const Matrix3x3 &mB)
 
bool operator== (const Matrix3x3 &mA, const Matrix3x3 &mB)
 
Matrix3x3 tensorProduct (const Matrix3x3 &mA, const Matrix3x3 &mB)
 

Constructor & Destructor Documentation

◆ Matrix3x3() [1/3]

Matrix3x3 ( )
inline

The default constructor returns a matrix with all its entries set to zero.

◆ Matrix3x3() [2/3]

Matrix3x3 ( double  d00,
double  d01,
double  d02,
double  d10,
double  d11,
double  d12,
double  d20,
double  d21,
double  d22 
)
inline

Set each entry of the matrix individually.

◆ Matrix3x3() [3/3]

Matrix3x3 ( const Matrix3x3 m)
inline
Parameters
mThe matrix to construct a copy of.

Member Function Documentation

◆ determinant()

double determinant ( ) const
inline
Returns
The determinant of the matrix.

◆ identity()

static Matrix3x3 identity ( )
inlinestatic
Returns
The identity matrix (diagonals set to 1, everything else is 0).

◆ operator()() [1/2]

double & operator() ( int  row,
int  column 
)
inline
Parameters
rowThe row of the matrix.
columnThe column of the matrix.
Returns
The element at the specified row and column.

◆ operator()() [2/2]

double operator() ( int  row,
int  column 
) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ operator*=()

Matrix3x3 & operator*= ( double  f)
inline

In-place multiplication by a scalar.

◆ operator+=()

Matrix3x3 & operator+= ( const Matrix3x3 m)
inline

In-place addition.

◆ operator-=()

Matrix3x3 & operator-= ( const Matrix3x3 m)
inline

In-place subtraction.

◆ operator/=()

Matrix3x3 & operator/= ( double  f)
inline

In-place division by a scalar.

◆ operator=()

Matrix3x3 & operator= ( const Matrix3x3 m)
inline
Parameters
mThe matrix to assign to this one.

◆ trace()

double trace ( ) const
inline
Returns
The trace of the matrix.

◆ transpose()

Matrix3x3 transpose ( ) const
inline
Returns
The transpose of the matrix.

Friends And Related Function Documentation

◆ innerProduct()

double innerProduct ( const Matrix3x3 mA,
const Matrix3x3 mB 
)
related
Returns
The inner product of the two matrices.

◆ operator!=()

bool operator!= ( const Matrix3x3 mA,
const Matrix3x3 mB 
)
related

Non-equivalence.

◆ operator+()

Matrix3x3 operator+ ( const Matrix3x3 mA,
const Matrix3x3 mB 
)
related
Returns
The element-wise addition of the two matrices ( mA + mB ).

◆ operator-() [1/2]

Matrix3x3 operator- ( const Matrix3x3 m)
related
Returns
The negative of the matrix m (ie every element of the returned matrix is the negative of the corresponding element of m ).

◆ operator-() [2/2]

Matrix3x3 operator- ( const Matrix3x3 mA,
const Matrix3x3 mB 
)
related
Returns
The element-wise subtraction of the two matrices ( mA - mB ).

◆ operator==()

bool operator== ( const Matrix3x3 mA,
const Matrix3x3 mB 
)
related

Equivalence.

◆ tensorProduct()

Matrix3x3 tensorProduct ( const Matrix3x3 mA,
const Matrix3x3 mB 
)
related
Returns
The tensor product of the two matrices.