Artec 3D Scanning SDK  2.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
artec::sdk::base::GenericMatrix< rows, cols, Type > Class Template Reference

Matrix of unspecified size. More...

#include <artec/sdk/base/GenericMatrix.h>

Public Types

typedef Type value_type
 

Public Member Functions

 GenericMatrix ()
 
template<typename Type2 , std::size_t sizeOfArray>
 GenericMatrix (const Type2(&values)[sizeOfArray])
 
template<typename Type2 >
 GenericMatrix (const Type2 *values, int rows2, int cols2)
 
 GenericMatrix (const GenericMatrix &second)
 Copying constructor. More...
 
template<typename Type2 >
 GenericMatrix (const GenericMatrix< rows, cols, Type2 > &second)
 Copying constructor with type conversion. More...
 
template<int rows2, int cols2, typename Type2 >
 GenericMatrix (const GenericMatrix< rows2, cols2, Type2 > &second)
 Copying constructor with size conversion. More...
 
void fill (const Type &value)
 Populate matrix with value. More...
 
template<int cols2>
GenericMatrix< rows, cols2, Type > operator* (const GenericMatrix< cols, cols2, Type > &mat) const
 Matrix-matrix multiplication. More...
 
GenericMatrix operator- () const
 Unary minus. More...
 
bool operator== (const GenericMatrix &other) const
 Check whether the matrices are equal. More...
 
bool operator!= (const GenericMatrix &m) const
 Check matrices whether the are not equal. More...
 
Type & operator() (int row, int col)
 
const Type & operator() (int row, int col) const
 
void setToIdentity ()
 Convert current matrix to identity one. More...
 
bool isIdentity () const
 Check whether the matrix is an identity one. More...
 
GenericMatrix< cols, rows, Type > transposed () const
 Return transposed matrix copy. More...
 
int size () const
 Return the number of elements in the matrix. More...
 
template<int rows2, int cols2>
GenericMatrixoperator= (const GenericMatrix< rows2, cols2, Type > &second)
 
GenericMatrixoperator= (const GenericMatrix &second)
 
GenericMatrixoperator+= (const GenericMatrix &mat)
 
GenericMatrixoperator-= (const GenericMatrix &mat)
 
GenericMatrixoperator*= (const GenericMatrix &other)
 
GenericMatrix operator+ (const GenericMatrix &mat) const
 
GenericMatrix operator- (const GenericMatrix &mat) const
 
GenericMatrixoperator*= (const Type &val)
 
GenericMatrixoperator/= (const Type &val)
 
GenericMatrix operator* (const Type &val) const
 
GenericMatrix operator/ (const Type &val) const
 
 operator Type * ()
 
 operator const Type * () const
 

Static Public Member Functions

static GenericMatrix< rows, cols, Type > identity ()
 Identity matrix. More...
 

Public Attributes

union {
   struct {
      Type   m [rows][cols]
 
   } 
 
   Type   data [rows *cols]
 
}; 
 Matrix data. More...
 

Detailed Description

template<int rows, int cols, typename Type = double>
class artec::sdk::base::GenericMatrix< rows, cols, Type >

Matrix of unspecified size.

Definition at line 30 of file GenericMatrix.h.

Member Typedef Documentation

template<int rows, int cols, typename Type = double>
typedef Type artec::sdk::base::GenericMatrix< rows, cols, Type >::value_type

Definition at line 33 of file GenericMatrix.h.

Constructor & Destructor Documentation

template<int rows, int cols, typename Type = double>
artec::sdk::base::GenericMatrix< rows, cols, Type >::GenericMatrix ( )
inline

Definition at line 35 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
template<typename Type2 , std::size_t sizeOfArray>
artec::sdk::base::GenericMatrix< rows, cols, Type >::GenericMatrix ( const Type2(&)  values[sizeOfArray])
inlineexplicit

Definition at line 38 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
template<typename Type2 >
artec::sdk::base::GenericMatrix< rows, cols, Type >::GenericMatrix ( const Type2 *  values,
int  rows2,
int  cols2 
)
inline

Definition at line 47 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
artec::sdk::base::GenericMatrix< rows, cols, Type >::GenericMatrix ( const GenericMatrix< rows, cols, Type > &  second)
inline

Copying constructor.

Definition at line 62 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
template<typename Type2 >
artec::sdk::base::GenericMatrix< rows, cols, Type >::GenericMatrix ( const GenericMatrix< rows, cols, Type2 > &  second)
inlineexplicit

Copying constructor with type conversion.

Definition at line 66 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
template<int rows2, int cols2, typename Type2 >
artec::sdk::base::GenericMatrix< rows, cols, Type >::GenericMatrix ( const GenericMatrix< rows2, cols2, Type2 > &  second)
inlineexplicit

Copying constructor with size conversion.

Definition at line 73 of file GenericMatrix.h.

Member Function Documentation

template<int rows, int cols, typename Type = double>
void artec::sdk::base::GenericMatrix< rows, cols, Type >::fill ( const Type &  value)
inline

Populate matrix with value.

Definition at line 101 of file GenericMatrix.h.

template<int rows, int cols, typename Type >
GenericMatrix< rows, cols, Type > artec::sdk::base::GenericMatrix< rows, cols, Type >::identity ( )
static

Identity matrix.

Definition at line 296 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
bool artec::sdk::base::GenericMatrix< rows, cols, Type >::isIdentity ( ) const
inline

Check whether the matrix is an identity one.

Definition at line 230 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
artec::sdk::base::GenericMatrix< rows, cols, Type >::operator const Type * ( ) const
inline

Conversion to plain data pointer operator

Definition at line 255 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
artec::sdk::base::GenericMatrix< rows, cols, Type >::operator Type * ( )
inline

Conversion to plain data pointer operator

Definition at line 254 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
bool artec::sdk::base::GenericMatrix< rows, cols, Type >::operator!= ( const GenericMatrix< rows, cols, Type > &  m) const
inline

Check matrices whether the are not equal.

Definition at line 203 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
Type& artec::sdk::base::GenericMatrix< rows, cols, Type >::operator() ( int  row,
int  col 
)
inline

Definition at line 208 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
const Type& artec::sdk::base::GenericMatrix< rows, cols, Type >::operator() ( int  row,
int  col 
) const
inline

Definition at line 213 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
template<int cols2>
GenericMatrix< rows, cols2, Type > artec::sdk::base::GenericMatrix< rows, cols, Type >::operator* ( const GenericMatrix< cols, cols2, Type > &  mat) const
inline

Matrix-matrix multiplication.

Definition at line 143 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
GenericMatrix artec::sdk::base::GenericMatrix< rows, cols, Type >::operator* ( const Type &  val) const
inline

Matrix-Scalar

Definition at line 171 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
GenericMatrix& artec::sdk::base::GenericMatrix< rows, cols, Type >::operator*= ( const GenericMatrix< rows, cols, Type > &  other)
inline

Arithmetical operations Matrix-Matrix (element-wise)

Definition at line 120 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
GenericMatrix& artec::sdk::base::GenericMatrix< rows, cols, Type >::operator*= ( const Type &  val)
inline

Matrix-Scalar

Definition at line 160 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
GenericMatrix artec::sdk::base::GenericMatrix< rows, cols, Type >::operator+ ( const GenericMatrix< rows, cols, Type > &  mat) const
inline

Arithmetical operations Matrix-Matrix (element-wise)

Definition at line 126 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
GenericMatrix& artec::sdk::base::GenericMatrix< rows, cols, Type >::operator+= ( const GenericMatrix< rows, cols, Type > &  mat)
inline

Arithmetical operations Matrix-Matrix (element-wise)

Definition at line 110 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
GenericMatrix artec::sdk::base::GenericMatrix< rows, cols, Type >::operator- ( const GenericMatrix< rows, cols, Type > &  mat) const
inline

Arithmetical operations Matrix-Matrix (element-wise)

Definition at line 133 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
GenericMatrix artec::sdk::base::GenericMatrix< rows, cols, Type >::operator- ( ) const
inline

Unary minus.

Definition at line 186 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
GenericMatrix& artec::sdk::base::GenericMatrix< rows, cols, Type >::operator-= ( const GenericMatrix< rows, cols, Type > &  mat)
inline

Arithmetical operations Matrix-Matrix (element-wise)

Definition at line 115 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
GenericMatrix artec::sdk::base::GenericMatrix< rows, cols, Type >::operator/ ( const Type &  val) const
inline

Matrix-Scalar

Definition at line 177 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
GenericMatrix& artec::sdk::base::GenericMatrix< rows, cols, Type >::operator/= ( const Type &  val)
inline

Matrix-Scalar

Definition at line 165 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
template<int rows2, int cols2>
GenericMatrix& artec::sdk::base::GenericMatrix< rows, cols, Type >::operator= ( const GenericMatrix< rows2, cols2, Type > &  second)
inline

Assignment operators

Definition at line 78 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
GenericMatrix& artec::sdk::base::GenericMatrix< rows, cols, Type >::operator= ( const GenericMatrix< rows, cols, Type > &  second)
inline

Assignment operators

Definition at line 93 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
bool artec::sdk::base::GenericMatrix< rows, cols, Type >::operator== ( const GenericMatrix< rows, cols, Type > &  other) const
inline

Check whether the matrices are equal.

Definition at line 194 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
void artec::sdk::base::GenericMatrix< rows, cols, Type >::setToIdentity ( )
inline

Convert current matrix to identity one.

Definition at line 221 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
int artec::sdk::base::GenericMatrix< rows, cols, Type >::size ( ) const
inline

Return the number of elements in the matrix.

Definition at line 258 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
GenericMatrix< cols, rows, Type > artec::sdk::base::GenericMatrix< rows, cols, Type >::transposed ( ) const
inline

Return transposed matrix copy.

Definition at line 242 of file GenericMatrix.h.

Member Data Documentation

union { ... }

Matrix data.

template<int rows, int cols, typename Type = double>
Type artec::sdk::base::GenericMatrix< rows, cols, Type >::data[rows *cols]

Definition at line 268 of file GenericMatrix.h.

template<int rows, int cols, typename Type = double>
Type artec::sdk::base::GenericMatrix< rows, cols, Type >::m[rows][cols]

Definition at line 265 of file GenericMatrix.h.


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