Ocean
Ocean::SquareMatrixT2< T > Class Template Reference

This class implements a 2x2 square matrix. More...

Public Types

typedef T Type
 Definition of the used data type. More...
 

Public Member Functions

 SquareMatrixT2 ()
 Creates a new SquareMatrixT2 object with undefined elements. More...
 
 SquareMatrixT2 (const SquareMatrixT2< T > &matrix)=default
 Copy constructor. More...
 
template<typename U >
 SquareMatrixT2 (const SquareMatrixT2< U > &matrix)
 Copy constructor for a matrix with difference element data type than T. More...
 
 SquareMatrixT2 (const bool setToIdentity)
 Creates a new SquareMatrixT2 object. More...
 
 SquareMatrixT2 (const VectorT2< T > &diagonal)
 Creates a new SquareMatrixT2 object by a given diagonal vector. More...
 
template<typename U >
 SquareMatrixT2 (const U *arrayValues)
 Creates a new SquareMatrixT2 object by four elements of float type U. More...
 
 SquareMatrixT2 (const T *arrayValues)
 Creates a new SquareMatrixT2 object by four elements. More...
 
template<typename U >
 SquareMatrixT2 (const U *arrayValues, const bool valuesRowAligned)
 Creates a new SquareMatrixT2 object by four elements. More...
 
 SquareMatrixT2 (const T *arrayValues, const bool valuesRowAligned)
 Creates a new SquareMatrixT2 object by four elements. More...
 
 SquareMatrixT2 (const T &m00, const T &m10, const T &m01, const T &m11)
 Creates a 2x2 rotation matrix by 4 given matrix elements. More...
 
 SquareMatrixT2 (const T eigenValue0, const T eigenValue1, const VectorT2< T > &eigenVector0, const VectorT2< T > &eigenVector1)
 Creates a covariance matrix by two eigen values and two corresponding eigen vectors. More...
 
SquareMatrixT2< T > transposed () const
 Returns the transposed of this matrix. More...
 
void transpose ()
 Transposes the matrix. More...
 
SquareMatrixT2< T > inverted () const
 Returns the inverted matrix of this matrix. More...
 
bool invert ()
 Inverts this matrix in place. More...
 
bool invert (SquareMatrixT2< T > &invertedMatrix) const
 Inverts the matrix and returns the result as parameter. More...
 
determinant () const
 Returns the determinant of the matrix. More...
 
trace () const
 Returns the trace of the matrix which is the sum of the diagonal elements. More...
 
bool solve (const VectorT2< T > &b, VectorT2< T > &x) const
 Solve a simple 2x2 system of linear equations: Ax = b Beware: The system of linear equations is assumed to be fully determined. More...
 
void toIdentity ()
 Sets the matrix to the identity matrix. More...
 
void toNull ()
 Sets the matrix to a zero matrix. More...
 
VectorT2< T > xAxis () const
 Returns the x axis which is the first column of the matrix. More...
 
VectorT2< T > yAxis () const
 Returns the y axis which is the middle column of the matrix. More...
 
VectorT2< T > diagonal () const
 Returns a 2D vector with values of the matrix diagonal. More...
 
norm () const
 Returns the norm of this matrix that is the sum of the absolute matrix elements. More...
 
bool isNull () const
 Returns whether this matrix is a null matrix. More...
 
bool isIdentity () const
 Returns whether this matrix is the identity matrix. More...
 
bool isSingular () const
 Returns whether this matrix is singular (and thus cannot be inverted). More...
 
bool isSymmetric (const T epsilon=NumericT< T >::eps()) const
 Returns whether this matrix is symmetric. More...
 
bool isEqual (const SquareMatrixT2< T > &matrix, const T eps=NumericT< T >::eps()) const
 Returns whether two matrices are almost identical up to a specified epsilon. More...
 
bool eigenSystem (T &eigenValue0, T &eigenValue1, VectorT2< T > &eigenVector0, VectorT2< T > &eigenVector1) const
 Performs an eigen value analysis. More...
 
const T * data () const
 Returns a pointer to the internal values. More...
 
T * data ()
 Returns a pointer to the internal values. More...
 
template<typename U >
void copyElements (U *arrayValues, const bool columnAligned=true) const
 Copies the elements of this matrix to an array with floating point values of type U. More...
 
void copyElements (T *arrayValues, const bool columnAligned=true) const
 Copies the elements of this matrix to an array with floating point values of type T. More...
 
SquareMatrixT2< T > & operator= (const SquareMatrixT2< T > &)=default
 Default copy assignment operator. More...
 
bool operator== (const SquareMatrixT2< T > &matrix) const
 Returns whether two matrices are identical up to a small epsilon. More...
 
bool operator!= (const SquareMatrixT2< T > &matrix) const
 Returns whether two matrices are not identical up to a small epsilon. More...
 
SquareMatrixT2< T > operator+ (const SquareMatrixT2< T > &matrix) const
 Adds two matrices. More...
 
SquareMatrixT2< T > & operator+= (const SquareMatrixT2< T > &matrix)
 Adds and assigns two matrices. More...
 
SquareMatrixT2< T > operator- (const SquareMatrixT2< T > &matrix) const
 Subtracts two matrices. More...
 
SquareMatrixT2< T > & operator-= (const SquareMatrixT2< T > &matrix)
 Subtracts and assigns two matrices. More...
 
SquareMatrixT2< T > operator- () const
 Returns the negative matrix of this matrix (all matrix elements are multiplied by -1). More...
 
SquareMatrixT2< T > operator* (const SquareMatrixT2< T > &matrix) const
 Multiplies two matrices. More...
 
SquareMatrixT2< T > & operator*= (const SquareMatrixT2< T > &matrix)
 Multiplies and assigns two matrices. More...
 
VectorT2< T > operator* (const VectorT2< T > &vector) const
 Multiply operator for a 2D vector. More...
 
SquareMatrixT2< T > operator* (const T value) const
 Multiplies this matrix with a scalar value. More...
 
SquareMatrixT2< T > & operator*= (const T value)
 Multiplies and assigns this matrix with a scalar value. More...
 
operator[] (const unsigned int index) const
 Element operator. More...
 
T & operator[] (const unsigned int index)
 Element operator. More...
 
operator() (const unsigned int row, const unsigned int column) const
 Element operator. More...
 
T & operator() (const unsigned int row, const unsigned int column)
 Element operator. More...
 
operator() (const unsigned int index) const
 Element operator. More...
 
T & operator() (const unsigned int index)
 Element operator. More...
 
const T * operator() () const
 Access operator. More...
 
T * operator() ()
 Access operator. More...
 
size_t operator() (const SquareMatrixT2< T > &matrix) const
 Hash function. More...
 
std::vector< SquareMatrixT2< float > > matrices2matrices (const std::vector< SquareMatrixT2< float > > &matrices)
 
std::vector< SquareMatrixT2< double > > matrices2matrices (const std::vector< SquareMatrixT2< double > > &matrices)
 

Static Public Member Functions

static size_t elements ()
 Returns the number of elements this matrix has. More...
 
template<typename U >
static std::vector< SquareMatrixT2< T > > matrices2matrices (const std::vector< SquareMatrixT2< U > > &matrices)
 Converts matrices with specific data type to matrices with different data type. More...
 
template<typename U >
static std::vector< SquareMatrixT2< T > > matrices2matrices (const SquareMatrixT2< U > *matrices, const size_t size)
 Converts matrices with specific data type to matrices with different data type. More...
 

Protected Attributes

values [4]
 The four values of the matrix. More...
 

Friends

template<typename U >
class SquareMatrixT2
 

Detailed Description

template<typename T>
class Ocean::SquareMatrixT2< T >

This class implements a 2x2 square matrix.

The four values are stored in a column aligned order with indices:

| 0 2 |
| 1 3 |
Template Parameters
TData type of matrix elements
See also
SquareMatrix2, SquareMatrixF2, SquareMatrixD2.

Member Typedef Documentation

◆ Type

template<typename T >
typedef T Ocean::SquareMatrixT2< T >::Type

Definition of the used data type.

Constructor & Destructor Documentation

◆ SquareMatrixT2() [1/11]

template<typename T >
Ocean::SquareMatrixT2< T >::SquareMatrixT2
inline

Creates a new SquareMatrixT2 object with undefined elements.

Beware: This matrix is neither a zero nor an entity matrix!

◆ SquareMatrixT2() [2/11]

template<typename T >
Ocean::SquareMatrixT2< T >::SquareMatrixT2 ( const SquareMatrixT2< T > &  matrix)
default

Copy constructor.

Parameters
matrixThe matrix to copy

◆ SquareMatrixT2() [3/11]

template<typename T >
template<typename U >
Ocean::SquareMatrixT2< T >::SquareMatrixT2 ( const SquareMatrixT2< U > &  matrix)
inlineexplicit

Copy constructor for a matrix with difference element data type than T.

Parameters
matrixThe matrix to copy
Template Parameters
UThe element data type of the second matrix

◆ SquareMatrixT2() [4/11]

template<typename T >
Ocean::SquareMatrixT2< T >::SquareMatrixT2 ( const bool  setToIdentity)
inlineexplicit

Creates a new SquareMatrixT2 object.

Parameters
setToIdentityDetermines whether an identity matrix will be created, otherwise the matrix is initialized with zeros

◆ SquareMatrixT2() [5/11]

template<typename T >
Ocean::SquareMatrixT2< T >::SquareMatrixT2 ( const VectorT2< T > &  diagonal)
inlineexplicit

Creates a new SquareMatrixT2 object by a given diagonal vector.

Parameters
diagonalDiagonal vector for the new matrix

◆ SquareMatrixT2() [6/11]

template<typename T >
template<typename U >
Ocean::SquareMatrixT2< T >::SquareMatrixT2 ( const U *  arrayValues)
explicit

Creates a new SquareMatrixT2 object by four elements of float type U.

Parameters
arrayValuesThe four matrix elements defining the new matrix, must be valid
Template Parameters
UThe floating point type of the given elements

◆ SquareMatrixT2() [7/11]

template<typename T >
Ocean::SquareMatrixT2< T >::SquareMatrixT2 ( const T *  arrayValues)
explicit

Creates a new SquareMatrixT2 object by four elements.

Parameters
arrayValuesThe four matrix elements defining the new matrix, must be valid

◆ SquareMatrixT2() [8/11]

template<typename T >
template<typename U >
Ocean::SquareMatrixT2< T >::SquareMatrixT2 ( const U *  arrayValues,
const bool  valuesRowAligned 
)

Creates a new SquareMatrixT2 object by four elements.

Parameters
arrayValuesThe four matrix elements defining the new matrix, must be valid
valuesRowAlignedTrue, if the given values are stored in a row aligned order; False, if the values are stored in a column aligned order (which is the default case for this matrix)
Template Parameters
UThe floating point type of the given elements

◆ SquareMatrixT2() [9/11]

template<typename T >
Ocean::SquareMatrixT2< T >::SquareMatrixT2 ( const T *  arrayValues,
const bool  valuesRowAligned 
)

Creates a new SquareMatrixT2 object by four elements.

Parameters
arrayValuesThe four matrix elements defining the new matrix, must be valid
valuesRowAlignedTrue, if the given values are stored in a row aligned order; False, if the values are stored in a column aligned order (which is the default case for this matrix)

◆ SquareMatrixT2() [10/11]

template<typename T >
Ocean::SquareMatrixT2< T >::SquareMatrixT2 ( const T &  m00,
const T &  m10,
const T &  m01,
const T &  m11 
)
inline

Creates a 2x2 rotation matrix by 4 given matrix elements.

Parameters
m00Element of the first row and first column
m10Element of the second row and first column
m01Element of the first row and second column
m11Element of the second row and second column

◆ SquareMatrixT2() [11/11]

template<typename T >
Ocean::SquareMatrixT2< T >::SquareMatrixT2 ( const T  eigenValue0,
const T  eigenValue1,
const VectorT2< T > &  eigenVector0,
const VectorT2< T > &  eigenVector1 
)

Creates a covariance matrix by two eigen values and two corresponding eigen vectors.

Parameters
eigenValue0First eigen value
eigenValue1Second eigen value
eigenVector0First eigen vector
eigenVector1Second eigen vector

Member Function Documentation

◆ copyElements() [1/2]

template<typename T >
void Ocean::SquareMatrixT2< T >::copyElements ( T *  arrayValues,
const bool  columnAligned = true 
) const
inline

Copies the elements of this matrix to an array with floating point values of type T.

Parameters
arrayValuesArray with 4 floating point values of type T receiving the elements of this matrix
columnAlignedTrue, if the target elements are column aligned, false to target row aligned elements

◆ copyElements() [2/2]

template<typename T >
template<typename U >
void Ocean::SquareMatrixT2< T >::copyElements ( U *  arrayValues,
const bool  columnAligned = true 
) const
inline

Copies the elements of this matrix to an array with floating point values of type U.

Parameters
arrayValuesArray with 4 floating point values of type U receiving the elements of this matrix
columnAlignedTrue, if the target elements are column aligned, false to target row aligned elements
Template Parameters
UFloating point type

◆ data() [1/2]

template<typename T >
T * Ocean::SquareMatrixT2< T >::data
inline

Returns a pointer to the internal values.

Returns
Pointer to the internal values

◆ data() [2/2]

template<typename T >
const T * Ocean::SquareMatrixT2< T >::data
inline

Returns a pointer to the internal values.

Returns
Pointer to the internal values

◆ determinant()

template<typename T >
T Ocean::SquareMatrixT2< T >::determinant
inline

Returns the determinant of the matrix.

Returns
Matrix determinant

◆ diagonal()

template<typename T >
VectorT2< T > Ocean::SquareMatrixT2< T >::diagonal
inline

Returns a 2D vector with values of the matrix diagonal.

Returns
Vector with diagonal values

◆ eigenSystem()

template<typename T >
bool Ocean::SquareMatrixT2< T >::eigenSystem ( T &  eigenValue0,
T &  eigenValue1,
VectorT2< T > &  eigenVector0,
VectorT2< T > &  eigenVector1 
) const

Performs an eigen value analysis.

Parameters
eigenValue0First eigen value
eigenValue1Second eigen value
eigenVector0First eigen vector
eigenVector1Second eigen vector
Returns
True, if succeeded

◆ elements()

template<typename T >
size_t Ocean::SquareMatrixT2< T >::elements
inlinestatic

Returns the number of elements this matrix has.

Returns
The number of elements, always 4

◆ invert() [1/2]

template<typename T >
bool Ocean::SquareMatrixT2< T >::invert
inline

Inverts this matrix in place.

Returns
True, if the matrix is not singular and could be inverted
See also
inverted(), solve().

◆ invert() [2/2]

template<typename T >
bool Ocean::SquareMatrixT2< T >::invert ( SquareMatrixT2< T > &  invertedMatrix) const
inline

Inverts the matrix and returns the result as parameter.

Parameters
invertedMatrixThe resulting inverted matrix
Returns
True, if the matrix is not singular and could be inverted
See also
inverted(), solve().

◆ inverted()

template<typename T >
SquareMatrixT2< T > Ocean::SquareMatrixT2< T >::inverted
inline

Returns the inverted matrix of this matrix.

This matrix must not be singular.
Beware: This function does not throw an exception if the matrix cannot be inverted.
Thus, ensure that the matrix is invertible before calling this function.
Even better: avoid the usage of this function and call invert() instead.
In case, this matrix is not invertible, this matrix will be returned instead.

Returns
The inverted matrix
See also
invert(), isSingular().

◆ isEqual()

template<typename T >
bool Ocean::SquareMatrixT2< T >::isEqual ( const SquareMatrixT2< T > &  matrix,
const T  eps = NumericT<T>::eps() 
) const
inline

Returns whether two matrices are almost identical up to a specified epsilon.

Parameters
matrixSecond matrix that will be checked
epsThe epsilon threshold to be used, with range [0, infinity)
Returns
True, if so

◆ isIdentity()

template<typename T >
bool Ocean::SquareMatrixT2< T >::isIdentity
inline

Returns whether this matrix is the identity matrix.

Returns
True, if so

◆ isNull()

template<typename T >
bool Ocean::SquareMatrixT2< T >::isNull
inline

Returns whether this matrix is a null matrix.

Returns
True, if so

◆ isSingular()

template<typename T >
bool Ocean::SquareMatrixT2< T >::isSingular
inline

Returns whether this matrix is singular (and thus cannot be inverted).

A matrix is singular if the determinant of a matrix is 0.

Returns
True, if so

◆ isSymmetric()

template<typename T >
bool Ocean::SquareMatrixT2< T >::isSymmetric ( const T  epsilon = NumericT<T>::eps()) const
inline

Returns whether this matrix is symmetric.

Parameters
epsilonThe epsilon threshold to be used, with range [0, infinity)
Returns
True, if so

◆ matrices2matrices() [1/4]

template<typename T >
template<typename U >
std::vector< SquareMatrixT2< T > > Ocean::SquareMatrixT2< T >::matrices2matrices ( const SquareMatrixT2< U > *  matrices,
const size_t  size 
)
inlinestatic

Converts matrices with specific data type to matrices with different data type.

Parameters
matricesThe matrices to convert
sizeThe number of matrices to convert
Returns
The converted matrices
Template Parameters
UThe element data type of the matrices to convert

◆ matrices2matrices() [2/4]

std::vector< SquareMatrixT2< double > > Ocean::SquareMatrixT2< double >::matrices2matrices ( const std::vector< SquareMatrixT2< double > > &  matrices)
inline

◆ matrices2matrices() [3/4]

std::vector< SquareMatrixT2< float > > Ocean::SquareMatrixT2< float >::matrices2matrices ( const std::vector< SquareMatrixT2< float > > &  matrices)
inline

◆ matrices2matrices() [4/4]

template<typename T >
template<typename U >
std::vector< SquareMatrixT2< T > > Ocean::SquareMatrixT2< T >::matrices2matrices ( const std::vector< SquareMatrixT2< U > > &  matrices)
inlinestatic

Converts matrices with specific data type to matrices with different data type.

Parameters
matricesThe matrices to convert
Returns
The converted matrices
Template Parameters
UThe element data type of the matrices to convert

◆ norm()

template<typename T >
T Ocean::SquareMatrixT2< T >::norm
inline

Returns the norm of this matrix that is the sum of the absolute matrix elements.

Returns
Matrix norm

◆ operator!=()

template<typename T >
bool Ocean::SquareMatrixT2< T >::operator!= ( const SquareMatrixT2< T > &  matrix) const
inline

Returns whether two matrices are not identical up to a small epsilon.

Parameters
matrixRight operand
Returns
True, if so

◆ operator()() [1/7]

template<typename T >
T * Ocean::SquareMatrixT2< T >::operator()
inline

Access operator.

Returns
Pointer to the internal values

◆ operator()() [2/7]

template<typename T >
const T * Ocean::SquareMatrixT2< T >::operator()
inline

Access operator.

Returns
Pointer to the internal values

◆ operator()() [3/7]

template<typename T >
size_t Ocean::SquareMatrixT2< T >::operator() ( const SquareMatrixT2< T > &  matrix) const
inline

Hash function.

Parameters
matrixThe matrix for which the hash value will be determined
Returns
The resulting hash value

◆ operator()() [4/7]

template<typename T >
T & Ocean::SquareMatrixT2< T >::operator() ( const unsigned int  index)
inline

Element operator.

Beware: No range check will be done!

Parameters
indexIndex of the element to return [0, 8]
Returns
Specified element

◆ operator()() [5/7]

template<typename T >
T Ocean::SquareMatrixT2< T >::operator() ( const unsigned int  index) const
inline

Element operator.

Beware: No range check will be done!

Parameters
indexIndex of the element to return [0, 8]
Returns
Specified element

◆ operator()() [6/7]

template<typename T >
T & Ocean::SquareMatrixT2< T >::operator() ( const unsigned int  row,
const unsigned int  column 
)
inline

Element operator.

Beware: No range check will be done!

Parameters
rowRow of the element to return [0, 1]
columnColumn of the element to return [0, 1]
Returns
Specified element

◆ operator()() [7/7]

template<typename T >
T Ocean::SquareMatrixT2< T >::operator() ( const unsigned int  row,
const unsigned int  column 
) const
inline

Element operator.

Beware: No range check will be done!

Parameters
rowRow of the element to return [0, 1]
columnColumn of the element to return [0, 1]
Returns
Specified element

◆ operator*() [1/3]

template<typename T >
SquareMatrixT2< T > Ocean::SquareMatrixT2< T >::operator* ( const SquareMatrixT2< T > &  matrix) const
inline

Multiplies two matrices.

Parameters
matrixRight operand
Returns
Product matrix

◆ operator*() [2/3]

template<typename T >
SquareMatrixT2< T > Ocean::SquareMatrixT2< T >::operator* ( const T  value) const
inline

Multiplies this matrix with a scalar value.

Parameters
valueRight operand
Returns
Resulting matrix

◆ operator*() [3/3]

template<typename T >
VectorT2< T > Ocean::SquareMatrixT2< T >::operator* ( const VectorT2< T > &  vector) const
inline

Multiply operator for a 2D vector.

Parameters
vectorRight operand
Returns
Resulting 2D vector

◆ operator*=() [1/2]

template<typename T >
SquareMatrixT2< T > & Ocean::SquareMatrixT2< T >::operator*= ( const SquareMatrixT2< T > &  matrix)
inline

Multiplies and assigns two matrices.

Parameters
matrixRight operand
Returns
Reference to this object

◆ operator*=() [2/2]

template<typename T >
SquareMatrixT2< T > & Ocean::SquareMatrixT2< T >::operator*= ( const T  value)
inline

Multiplies and assigns this matrix with a scalar value.

Parameters
valueright operand
Returns
Reference to this object

◆ operator+()

template<typename T >
SquareMatrixT2< T > Ocean::SquareMatrixT2< T >::operator+ ( const SquareMatrixT2< T > &  matrix) const
inline

Adds two matrices.

Parameters
matrixRight operand
Returns
Sum matrix

◆ operator+=()

template<typename T >
SquareMatrixT2< T > & Ocean::SquareMatrixT2< T >::operator+= ( const SquareMatrixT2< T > &  matrix)
inline

Adds and assigns two matrices.

Parameters
matrixRight operand
Returns
Reference to this object

◆ operator-() [1/2]

template<typename T >
SquareMatrixT2< T > Ocean::SquareMatrixT2< T >::operator-
inline

Returns the negative matrix of this matrix (all matrix elements are multiplied by -1).

Returns
Resulting negative matrix

◆ operator-() [2/2]

template<typename T >
SquareMatrixT2< T > Ocean::SquareMatrixT2< T >::operator- ( const SquareMatrixT2< T > &  matrix) const
inline

Subtracts two matrices.

Parameters
matrixRight operand
Returns
Difference matrix

◆ operator-=()

template<typename T >
SquareMatrixT2< T > & Ocean::SquareMatrixT2< T >::operator-= ( const SquareMatrixT2< T > &  matrix)
inline

Subtracts and assigns two matrices.

Parameters
matrixRight operand
Returns
Reference to this object

◆ operator=()

template<typename T >
SquareMatrixT2<T>& Ocean::SquareMatrixT2< T >::operator= ( const SquareMatrixT2< T > &  )
default

Default copy assignment operator.

Returns
Reference to this object

◆ operator==()

template<typename T >
bool Ocean::SquareMatrixT2< T >::operator== ( const SquareMatrixT2< T > &  matrix) const
inline

Returns whether two matrices are identical up to a small epsilon.

Parameters
matrixRight operand
Returns
True, if so

◆ operator[]() [1/2]

template<typename T >
T & Ocean::SquareMatrixT2< T >::operator[] ( const unsigned int  index)
inline

Element operator.

Beware: No range check will be done!

Parameters
indexIndex of the element to return [0, 4]
Returns
Specified element

◆ operator[]() [2/2]

template<typename T >
T Ocean::SquareMatrixT2< T >::operator[] ( const unsigned int  index) const
inline

Element operator.

Beware: No range check will be done!

Parameters
indexIndex of the element to return [0, 4]
Returns
Specified element

◆ solve()

template<typename T >
bool Ocean::SquareMatrixT2< T >::solve ( const VectorT2< T > &  b,
VectorT2< T > &  x 
) const
inline

Solve a simple 2x2 system of linear equations: Ax = b Beware: The system of linear equations is assumed to be fully determined.

Parameters
bThe right-hand side vector
xThe resulting solution vector
Returns
True, if the system could be solved
See also
invert(), inverted().

◆ toIdentity()

template<typename T >
void Ocean::SquareMatrixT2< T >::toIdentity
inline

Sets the matrix to the identity matrix.

◆ toNull()

template<typename T >
void Ocean::SquareMatrixT2< T >::toNull
inline

Sets the matrix to a zero matrix.

See also
isNull();

◆ trace()

template<typename T >
T Ocean::SquareMatrixT2< T >::trace
inline

Returns the trace of the matrix which is the sum of the diagonal elements.

Returns
Trace of the matrix

◆ transpose()

template<typename T >
void Ocean::SquareMatrixT2< T >::transpose
inline

Transposes the matrix.

◆ transposed()

template<typename T >
SquareMatrixT2< T > Ocean::SquareMatrixT2< T >::transposed
inline

Returns the transposed of this matrix.

Returns
Transposed matrix

◆ xAxis()

template<typename T >
VectorT2< T > Ocean::SquareMatrixT2< T >::xAxis
inline

Returns the x axis which is the first column of the matrix.

Returns
Vector with the first column

◆ yAxis()

template<typename T >
VectorT2< T > Ocean::SquareMatrixT2< T >::yAxis
inline

Returns the y axis which is the middle column of the matrix.

Returns
Vector with the middle column

Friends And Related Function Documentation

◆ SquareMatrixT2

template<typename T >
template<typename U >
friend class SquareMatrixT2
friend

Field Documentation

◆ values

template<typename T >
T Ocean::SquareMatrixT2< T >::values[4]
protected

The four values of the matrix.


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