DSC
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Types | Public Member Functions | Protected Member Functions | List of all members
CGLA::ArithSqMatFloat< VT, MT, ROWS > Class Template Reference

#include <ArithSqMatFloat.h>

Inheritance diagram for CGLA::ArithSqMatFloat< VT, MT, ROWS >:
CGLA::ArithMatFloat< VT, VT, MT, ROWS >

Public Types

typedef VT VectorType
 Vector type.
 
typedef VT::ScalarType ScalarType
 The type of a matrix element.
 
- Public Types inherited from CGLA::ArithMatFloat< VT, VT, MT, ROWS >
typedef VT HVectorType
 Horizontal vector type.
 
typedef VT VVectorType
 Vertical vector type.
 
typedef VT::ScalarType ScalarType
 The type of a matrix element.
 

Public Member Functions

const MT & operator*= (const MT &m2) noexcept
 
const MT & operator*= (ScalarType k) noexcept
 
void identity ()
 
- Public Member Functions inherited from CGLA::ArithMatFloat< VT, VT, MT, ROWS >
const ScalarTypeget () const
 
ScalarTypeget ()
 
const VT & operator[] (unsigned int i) const
 Const index operator. Returns i'th row of matrix.
 
VT & operator[] (unsigned int i)
 Non-const index operator. Returns i'th row of matrix.
 
bool operator== (const MT &v) const
 Equality operator.
 
bool operator!= (const MT &v) const
 Inequality operator.
 
const MT operator* (ScalarType k) const
 Multiply scalar onto matrix. All entries are multiplied by scalar.
 
const MT operator/ (ScalarType k) const
 Divide all entries in matrix by scalar.
 
const MT & operator*= (ScalarType k)
 Assignment multiplication of matrix by scalar.
 
const MT & operator/= (ScalarType k)
 Assignment division of matrix by scalar.
 
const MT operator+ (const MT &m1) const
 Add two matrices.
 
const MT operator- (const MT &m1) const
 Subtract two matrices.
 
const MT operator- () const
 Negate matrix.
 
const MT & operator+= (const MT &v)
 Assigment addition of matrices.
 
const MT & operator-= (const MT &v)
 Assigment subtraction of matrices.
 

Protected Member Functions

 ArithSqMatFloat () noexcept
 Construct 0 matrix.
 
 ArithSqMatFloat (ScalarType _a) noexcept
 Construct matrix where all values are equal to constructor argument.
 
 ArithSqMatFloat (VT _a, VT _b) noexcept
 Construct 2x2 Matrix from two vectors.
 
 ArithSqMatFloat (VT _a, VT _b, VT _c) noexcept
 Construct 3x3 Matrix from three vectors.
 
 ArithSqMatFloat (VT _a, VT _b, VT _c, VT _d) noexcept
 Construct 4x4 Matrix from four vectors.
 
- Protected Member Functions inherited from CGLA::ArithMatFloat< VT, VT, MT, ROWS >
 ArithMatFloat ()
 Construct 0 matrix.
 
 ArithMatFloat (ScalarType x)
 Construct a matrix where all entries are the same.
 
 ArithMatFloat (VT_a)
 Construct a matrix where all rows are the same.
 
 ArithMatFloat (VT_a, VT_b)
 Construct a matrix with two rows.
 
 ArithMatFloat (VT_a, VT_b, VT_c)
 Construct a matrix with three rows.
 
 ArithMatFloat (VT_a, VT_b, VT_c, VT_d)
 Construct a matrix with four rows.
 

Additional Inherited Members

- Static Public Member Functions inherited from CGLA::ArithMatFloat< VT, VT, MT, ROWS >
static unsigned int get_v_dim ()
 Get vertical dimension of matrix.
 
static unsigned int get_h_dim ()
 Get horizontal dimension of matrix.
 
- Protected Attributes inherited from CGLA::ArithMatFloat< VT, VT, MT, ROWS >
VT data [ROWS]
 The actual contents of the matrix.
 

Detailed Description

template<class VT, class MT, unsigned int ROWS>
class CGLA::ArithSqMatFloat< VT, MT, ROWS >

Template for square matrices.

Some functions like trace and determinant work only on square matrices. To express this in the class hierarchy, ArithSqMatFloat was created. ArithSqMatFloat is derived from ArithMat and contains a few extra facilities applicable only to square matrices.

Member Function Documentation

template<class VT, class MT, unsigned int ROWS>
const MT& CGLA::ArithSqMatFloat< VT, MT, ROWS >::operator*= ( const MT &  m2)
inlinenoexcept

Assignment multiplication of matrices. This function is not very efficient. This because we need a temporary matrix anyway, so it can't really be made efficient.


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