FOUND
Loading...
Searching...
No Matches
found::Mat3 Class Reference

A Mat3 is a mutable object that represents a 3x3 Matrix. More...

#include <attitude-utils.hpp>

Public Member Functions

decimal At (int i, int j) const
 Obtains an entry in this Matrix.
 
Vec3 Column (int) const
 Obtains one of the column vectors in this Matrix.
 
Vec3 Row (int) const
 Obtains one of the row vectors in this Matrix.
 
decimal Trace () const
 Obtains the trace of this Matrix.
 
decimal Det () const
 Obtains the determinant of this Matrix.
 
Mat3 operator+ (const Mat3 &) const
 Matrix Addition (element-wise)
 
Mat3 operator* (const Mat3 &) const
 Matrix Multiplication.
 
Vec3 operator* (const Vec3 &) const
 Matrix-Vector Multiplication.
 
Mat3 operator* (const decimal &) const
 Matrix-Scalar Multiplication.
 
Mat3 Transpose () const
 Obtains the transpose of this Matrix.
 
Mat3 Inverse () const
 Obtains the inverse of this Matrix.
 

Public Attributes

decimal x [9]
 The matrix entries.
 

Detailed Description

A Mat3 is a mutable object that represents a 3x3 Matrix.

Member Function Documentation

◆ At()

decimal found::Mat3::At ( int  i,
int  j 
) const

Obtains an entry in this Matrix.

Parameters
iThe row of the entry
jThe column of the entry
Returns
The value of the entry in this at (i, j)

◆ Column()

Vec3 found::Mat3::Column ( int  j) const

Obtains one of the column vectors in this Matrix.

Parameters
jThe column of the vector
Returns
The vector at column j

◆ Det()

decimal found::Mat3::Det ( ) const

Obtains the determinant of this Matrix.

Returns
The determinant of this

◆ Inverse()

Mat3 found::Mat3::Inverse ( ) const

Obtains the inverse of this Matrix.

Returns
The inverse Matrix of this

◆ operator*() [1/3]

Mat3 found::Mat3::operator* ( const decimal &  scalar) const

Matrix-Scalar Multiplication.

Parameters
scalarThe scalar to multiply with
Returns
scalar * this

◆ operator*() [2/3]

Mat3 found::Mat3::operator* ( const Mat3 other) const

Matrix Multiplication.

Parameters
otherThe other matrix
Returns
this @ other

◆ operator*() [3/3]

Vec3 found::Mat3::operator* ( const Vec3 vec) const

Matrix-Vector Multiplication.

Parameters
vecThe vector to multiply
Returns
this @ other
Note
Same as Vector::operator*(const Mat3 &), but with swapped parameters (duh?)

◆ operator+()

Mat3 found::Mat3::operator+ ( const Mat3 other) const

Matrix Addition (element-wise)

Parameters
other
Returns
this + other

◆ Row()

Vec3 found::Mat3::Row ( int  i) const

Obtains one of the row vectors in this Matrix.

Parameters
iThe row of the vector
Returns
The vector at row i

◆ Trace()

decimal found::Mat3::Trace ( ) const

Obtains the trace of this Matrix.

Returns
The trace of this

◆ Transpose()

Mat3 found::Mat3::Transpose ( ) const

Obtains the transpose of this Matrix.

Returns
The transpose Matrix of this
Note
Use this over Inverse if your matrix is orthogonal (e.g. A DCM)

The documentation for this class was generated from the following files: