OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT > Class Template Reference

A fixed size matrix class. More...

#include <WMatrixFixed.h>

+ Inheritance diagram for WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >:
+ Collaboration diagram for WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >:

Public Types

typedef ValueT ValueType
 The integral type used in this matrix. More...
 
typedef ValueStoreT< ValueT, Rows, Cols > ValueStoreType
 The storage container. More...
 
typedef WMatrixFixed< ValueT, Rows, Cols, ValueStoreT > MatrixType
 The whole matrix as a type for lazy programmers. More...
 

Public Member Functions

size_t getRows () const
 The number of rows. More...
 
size_t getColumns () const
 The number of columns. More...
 
size_t size () const
 The number of entries. More...
 
 WMatrixFixed ()
 Default constructor. More...
 
 WMatrixFixed (const ValueT &x, const ValueT &y)
 Constructor easing the initialization of vectors. More...
 
 WMatrixFixed (const ValueT &x, const ValueT &y, const ValueT &z)
 Constructor easing the initialization of vectors. More...
 
 WMatrixFixed (const ValueT &x, const ValueT &y, const ValueT &z, const ValueT &w)
 Constructor easing the initialization of vectors. More...
 
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
 WMatrixFixed (const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &m)
 Copy construction casting the given value type. More...
 
 WMatrixFixed (const WValue< ValueT > &val)
 Casting constructor for WValue. More...
 
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
void setRowVector (size_t index, const WMatrixFixed< RHSValueT, Rows, 1, RHSValueStoreT > &vec)
 Set a row to a specific vector. More...
 
WMatrixFixed< ValueT, Cols, 1, ValueStoreT > getRowVector (size_t index) const
 Get a vector containing a specific row. More...
 
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
void setColumnVector (size_t index, const WMatrixFixed< RHSValueT, Rows, 1, RHSValueStoreT > &vec)
 Set a column to a specific vector. More...
 
WMatrixFixed< ValueT, Rows, 1 > getColumnVector (size_t index) const
 Get a vector containing a specific column. More...
 
 operator Eigen::Matrix< ValueT, Rows, Cols > () const
 Conversion to a Eigen3 Matrix of same size and type. More...
 
 operator osg::Vec2d () const
 Cast to OSG Vector. More...
 
 operator osg::Vec2f () const
 Cast to OSG Vector. More...
 
 operator osg::Vec3d () const
 Cast to OSG Vector. More...
 
 operator osg::Vec3f () const
 Cast to OSG Vector. More...
 
 operator osg::Vec4d () const
 Cast to OSG Vector. More...
 
 operator osg::Vec4f () const
 Cast to OSG Vector. More...
 
 operator osg::Matrixd () const
 Convert this matrix to a OSG Matrix of size 4x4. More...
 
template<typename TargetType >
TargetType as () const
 A convenience function to cast the WMatrixFixed types to arbitrary other vector/matrix types that are supported by WMatrixFixed. More...
 
template<typename ResultValueType , ValueStoreTemplate ResultValueStore>
 operator WMatrixFixed< ResultValueType, Rows, Cols, ResultValueStore > () const
 Cast to matrix of same size with different value type. More...
 
 WMatrixFixed (const Eigen::Matrix< ValueT, Rows, Cols > &m)
 Creates a WMatrix from a given Eigen3 Matrix. More...
 
 WMatrixFixed (const osg::Matrixd &m)
 Creates a WMatrix from a given OSG 4x4 Matrix. More...
 
 WMatrixFixed (const osg::Vec3f &m)
 Creates a WMatrix from a given OSG Vector. More...
 
 WMatrixFixed (const osg::Vec3d &m)
 Creates a WMatrix from a given OSG Vector. More...
 
 WMatrixFixed (const osg::Vec4f &m)
 Creates a WMatrix from a given OSG Vector. More...
 
 WMatrixFixed (const osg::Vec4d &m)
 Creates a WMatrix from a given OSG Vector. More...
 
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
MatrixTypeoperator= (const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &rhs)
 Assigns the given argument matrix to this one. More...
 
template<typename RHSValueT , size_t RHSCols, ValueStoreTemplate RHSValueStoreT>
WMatrixFixed< typename WTypeTraits::TypePromotion< ValueT, RHSValueT >::Result, Rows, RHSCols, ValueStoreT > operator* (const WMatrixFixed< RHSValueT, Cols, RHSCols, RHSValueStoreT > &rhs) const
 Matrix-Matrix multiplication. More...
 
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
void operator*= (const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &rhs)
 Matrix-Matrix multiplication with self-assignment. More...
 
template<typename RHSValueT >
WMatrixFixed< typename WTypeTraits::TypePromotion< ValueT, RHSValueT >::Result, Rows, Cols, ValueStoreT > operator* (const RHSValueT &rhs) const
 Matrix-Scalar multiplication. More...
 
template<typename RHSValueT >
void operator*= (const RHSValueT &rhs)
 Matrix-Scalar multiplication with self-assignment. More...
 
template<typename RHSValueT >
WMatrixFixed< typename WTypeTraits::TypePromotion< ValueT, RHSValueT >::Result, Rows, Cols, ValueStoreT > operator/ (const RHSValueT &rhs) const
 Matrix-Scalar division. More...
 
template<typename RHSValueT >
void operator/= (const RHSValueT &rhs)
 Matrix-Scalar division with self-assignmnet. More...
 
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
WMatrixFixed< typename WTypeTraits::TypePromotion< ValueT, RHSValueT >::Result, Rows, Cols, ValueStoreT > operator+ (const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &rhs) const
 Matrix addition. More...
 
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
void operator+= (const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &rhs)
 Matrix addition with self-assignment. More...
 
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
WMatrixFixed< typename WTypeTraits::TypePromotion< ValueT, RHSValueT >::Result, Rows, Cols, ValueStoreT > operator- (const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &rhs) const
 Matrix subtraction. More...
 
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
void operator-= (const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &rhs) throw ()
 Matrix subtraction with self-assignment. More...
 
ValueT & operator() (size_t row, size_t col) throw ()
 Returns a reference to the component of an row and column in order to provide access to the component. More...
 
const ValueT & operator() (size_t row, size_t col) const throw ()
 Returns a reference to the component of an row and column in order to provide access to the component. More...
 
ValueT & operator[] (size_t row) throw ()
 Returns a reference to the component of the first column to provide access to the component. More...
 
const ValueT & operator[] (size_t row) const throw ()
 Returns a reference to the component of the first column to provide access to the component. More...
 
ValueT & at (size_t row, size_t col)
 Returns a reference to the component of an row and column in order to provide access to the component. More...
 
const ValueT & at (size_t row, size_t col) const
 Returns a const reference to the component of an row and column in order to provide access to the component. More...
 
ValueT & x () throw ()
 Access x element of vector. More...
 
const ValueT & x () const throw ()
 Access x element of vector. More...
 
ValueT & y () throw ()
 Access y element of vector. More...
 
const ValueT & y () const throw ()
 Access y element of vector. More...
 
ValueT & z () throw ()
 Access z element of vector. More...
 
const ValueT & z () const throw ()
 Access z element of vector. More...
 
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
bool operator== (const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &rhs) const throw ()
 Compares two matrices and returns true if they are equal (component-wise). More...
 
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
bool operator< (const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &rhs) const throw ()
 Compares two matrices and returns true if this is smaller than the specified one (component-wise). More...
 
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
bool operator!= (const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &rhs) const throw ()
 Compares two matrices and returns true if they are not equal. More...
 

Static Public Member Functions

static MatrixType identity ()
 Returns an identity matrix. More...
 
static MatrixType zero ()
 Returns a zero-initialized matrix. More...
 
template<typename RHSValueT , size_t RHSRows, size_t RHSCols, ValueStoreTemplate RHSValueStoreT>
static MatrixType fromMatrix (const WMatrixFixed< RHSValueT, RHSRows, RHSCols, RHSValueStoreT > &src, size_t rowOffset=0, size_t colOffset=0)
 Copy construction allowing the creation of a WMatrixFixed by another matrix of different size. More...
 
template<typename RHSValueT , size_t RHSRows, size_t RHSCols, ValueStoreTemplate RHSValueStoreT>
static MatrixType fromMatrices (const MatrixType &m, const WMatrixFixed< RHSValueT, RHSRows, RHSCols, RHSValueStoreT > &src, size_t rowOffset=0, size_t colOffset=0)
 Copy construction allowing the creation of a WMatrixFixed by another matrix of different size. More...
 

Private Member Functions

template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
void setValues (const RHSValueStoreT< RHSValueT, Rows, Cols > &values)
 Sets the new values. More...
 

Private Attributes

ValueStoreType m_values
 The value array. More...
 

Friends

class WMatrixFixedTest
 Access for test class. More...
 
template<typename ValueTT , size_t Rowss, size_t Colss, ValueStoreTemplate ValueStoreTT>
class WMatrixFixed
 This is needed for access to the storage object of another matrix. More...
 

Detailed Description

template<typename ValueT, size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
class WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >

A fixed size matrix class.

This is the default type in OpenWalnut. You can easily convert this matrix to and from the Eigen3 types and OSG Types.

Template Parameters
ValueTThe type of the values stored. Most of the operations, if multiple types are involved, use WTypeTraits to guess the better of both.
RowsNumber of Rows
ColsNumber of Columns
ValueStoreTThe ValueStore handles the values and their access. Use special types here for a fine-grained access control or data-management

Definition at line 149 of file WMatrixFixed.h.

Member Typedef Documentation

◆ MatrixType

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
typedef WMatrixFixed< ValueT, Rows, Cols, ValueStoreT > WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::MatrixType

The whole matrix as a type for lazy programmers.

Definition at line 176 of file WMatrixFixed.h.

◆ ValueStoreType

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
typedef ValueStoreT< ValueT, Rows, Cols > WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::ValueStoreType

The storage container.

Definition at line 171 of file WMatrixFixed.h.

◆ ValueType

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
typedef ValueT WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::ValueType

The integral type used in this matrix.

Definition at line 166 of file WMatrixFixed.h.

Constructor & Destructor Documentation

◆ WMatrixFixed() [1/12]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed ( )
inline

Default constructor.

The values are initialized with 0. Use the static methods zero(), identity() or any of the predefined transformations if an initialized matrix is wished.

Definition at line 216 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator()().

+ Here is the call graph for this function:

◆ WMatrixFixed() [2/12]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed ( const ValueT &  x,
const ValueT &  y 
)
inline

Constructor easing the initialization of vectors.

This won't compile if Cols != 1 and Rows != 2.

Parameters
xx coefficient
yy coefficient

Definition at line 234 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[](), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::x(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::y().

+ Here is the call graph for this function:

◆ WMatrixFixed() [3/12]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed ( const ValueT &  x,
const ValueT &  y,
const ValueT &  z 
)
inline

Constructor easing the initialization of vectors.

This won't compile if Cols != 1 and Rows != 3.

Parameters
xx coefficient
yy coefficient
zz coefficient

Definition at line 249 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[](), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::x(), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::y(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::z().

+ Here is the call graph for this function:

◆ WMatrixFixed() [4/12]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed ( const ValueT &  x,
const ValueT &  y,
const ValueT &  z,
const ValueT &  w 
)
inline

Constructor easing the initialization of vectors.

This won't compile if Cols != 1 and Rows != 4.

Parameters
xx coefficient
yy coefficient
zz coefficient
ww coefficient

Definition at line 266 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[](), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::x(), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::y(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::z().

+ Here is the call graph for this function:

◆ WMatrixFixed() [5/12]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed ( const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &  m)
inline

Copy construction casting the given value type.

This is useful to create matrices with matrices using another value type.

Template Parameters
RHSValueTValue type of the given matrix to copy
RHSValueStoreTValuestore type of the given matrix to copy
Parameters
mthe matrix to copy

Definition at line 284 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::m_values, and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::setValues().

+ Here is the call graph for this function:

◆ WMatrixFixed() [6/12]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed ( const WValue< ValueT > &  val)
inline

Casting constructor for WValue.

This won't compile if Cols != 1 and causes a runtime assertion if val.size() != Rows.

Parameters
valthe WValue with the fitting size.

Definition at line 295 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[](), and WValue< T >::size().

+ Here is the call graph for this function:

◆ WMatrixFixed() [7/12]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed ( const Eigen::Matrix< ValueT, Rows, Cols > &  m)
inline

Creates a WMatrix from a given Eigen3 Matrix.

Parameters
mthe Eigen3 matrix.

Definition at line 640 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator()().

+ Here is the call graph for this function:

◆ WMatrixFixed() [8/12]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed ( const osg::Matrixd &  m)
inline

Creates a WMatrix from a given OSG 4x4 Matrix.

Will not compile if Rows != 4 or Cols != 4.

Parameters
mthe OSG matrix.

Definition at line 656 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator()().

+ Here is the call graph for this function:

◆ WMatrixFixed() [9/12]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed ( const osg::Vec3f &  m)
inline

Creates a WMatrix from a given OSG Vector.

Will not compile if Rows != 3 or Cols != 1.

Parameters
mthe OSG vector.

Definition at line 675 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[]().

+ Here is the call graph for this function:

◆ WMatrixFixed() [10/12]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed ( const osg::Vec3d &  m)
inline

Creates a WMatrix from a given OSG Vector.

Will not compile if Rows != 3 or Cols != 1.

Parameters
mthe OSG vector.

Definition at line 690 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[]().

+ Here is the call graph for this function:

◆ WMatrixFixed() [11/12]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed ( const osg::Vec4f &  m)
inline

Creates a WMatrix from a given OSG Vector.

Will not compile if Rows != 4 or Cols != 1.

Parameters
mthe OSG vector.

Definition at line 705 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[]().

+ Here is the call graph for this function:

◆ WMatrixFixed() [12/12]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed ( const osg::Vec4d &  m)
inline

Creates a WMatrix from a given OSG Vector.

Will not compile if Rows != 4 or Cols != 1.

Parameters
mthe OSG vector.

Definition at line 721 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[]().

+ Here is the call graph for this function:

Member Function Documentation

◆ as()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename TargetType >
TargetType WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::as ( ) const
inline

A convenience function to cast the WMatrixFixed types to arbitrary other vector/matrix types that are supported by WMatrixFixed.

This method is mainly needed for ambiguities during type resolution, if the target methods signature allows several different vec/matrix types. Example: you have void do( osg::Vec3f v ) and void do( osg::Vec3d v ). If you do WVector3d myV; do( myV ); This is ambiguous since WVector3d can be casted to either osg::Vec3d AND Vec3f implicitly.

Template Parameters
TargetTypethe type needed (to cast to)
Returns
the required type

Definition at line 614 of file WMatrixFixed.h.

◆ at() [1/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
ValueT& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at ( size_t  row,
size_t  col 
)
inline

Returns a reference to the component of an row and column in order to provide access to the component.

It does check for validity of the indices. Use operator() for avoiding this check.

Parameters
rowthe row, staring with 0
colthe column, starting with 0
Returns
A reference to the component of an row and column
Exceptions
WOutOfBoundsif the specified index is invalid

Definition at line 1003 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator()(), and string_utils::toString().

Referenced by WTrackingUtilityTest::buildTestData(), WThreadedTrackingFunctionTest::buildTestData(), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getColumnVector(), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getRowVector(), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::setColumnVector(), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::setRowVector(), WMatrixFixedTest::testAt(), WMatrixFixedTest::testGetColVector(), and WMatrixFixedTest::testTranspose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ at() [2/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
const ValueT& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at ( size_t  row,
size_t  col 
) const
inline

Returns a const reference to the component of an row and column in order to provide access to the component.

It does check for validity of the indices. Use operator() for avoiding this check.

Parameters
rowthe row, staring with 0
colthe column, starting with 0
Returns
A const reference to the component of an row and column.
Exceptions
WOutOfBoundsif the specified index is invalid

Definition at line 1026 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator()(), and string_utils::toString().

+ Here is the call graph for this function:

◆ fromMatrices()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , size_t RHSRows, size_t RHSCols, ValueStoreTemplate RHSValueStoreT>
static MatrixType WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::fromMatrices ( const MatrixType m,
const WMatrixFixed< RHSValueT, RHSRows, RHSCols, RHSValueStoreT > &  src,
size_t  rowOffset = 0,
size_t  colOffset = 0 
)
inlinestatic

Copy construction allowing the creation of a WMatrixFixed by another matrix of different size.

The specified source matrix gets copied into the area specified by its dimensions and the offset. On all other places, the specified reference matrix is used.

Template Parameters
RHSValueTValue type of the given matrix
RHSRowsNumber of rows of the given matrix.
RHSColsNumber of cols of the given matrix.
RHSValueStoreTValue store of the given matrix.
Parameters
mthe reference matrix to use where src is not defined or used (due to offset)
srcthe matrix to copy
rowOffsetrow offset, defaults to 0
colOffsetcol offset, defaults to 0
Returns
The newly created matrix.

Definition at line 380 of file WMatrixFixed.h.

Referenced by WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::fromMatrix().

+ Here is the caller graph for this function:

◆ fromMatrix()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , size_t RHSRows, size_t RHSCols, ValueStoreTemplate RHSValueStoreT>
static MatrixType WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::fromMatrix ( const WMatrixFixed< RHSValueT, RHSRows, RHSCols, RHSValueStoreT > &  src,
size_t  rowOffset = 0,
size_t  colOffset = 0 
)
inlinestatic

Copy construction allowing the creation of a WMatrixFixed by another matrix of different size.

Please see fromMatrices for more details, since this call is equivalent to fromMatrices( zero(), src, rowOffset, colOffset ).

See also
fromMatrices
Template Parameters
RHSValueTValue type of the given matrix
RHSRowsNumber of rows of the given matrix.
RHSColsNumber of cols of the given matrix.
RHSValueStoreTValue store of the given matrix.
Parameters
srcthe matrix to copy
rowOffsetrow offset, defaults to 0
colOffsetcol offset, defaults to 0
Returns
The newly created matrix.

Definition at line 356 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::fromMatrices(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::zero().

+ Here is the call graph for this function:

◆ getColumns()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
size_t WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getColumns ( ) const
inline

The number of columns.

Returns
the number of columns.

Definition at line 193 of file WMatrixFixed.h.

Referenced by WMatrixFixedTest::testGetNbRowsAndCols().

+ Here is the caller graph for this function:

◆ getColumnVector()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, 1 > WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getColumnVector ( size_t  index) const
inline

Get a vector containing a specific column.

Parameters
indexthe index of the column
Returns
the column as a vector

Definition at line 477 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at().

Referenced by WMatrixFixedTest::testGetColVector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRows()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
size_t WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getRows ( ) const
inline

The number of rows.

Returns
the number of rows.

Definition at line 183 of file WMatrixFixed.h.

Referenced by WMatrix< T >::operator*(), and WMatrixFixedTest::testGetNbRowsAndCols().

+ Here is the caller graph for this function:

◆ getRowVector()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Cols, 1, ValueStoreT > WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getRowVector ( size_t  index) const
inline

Get a vector containing a specific row.

Parameters
indexthe index of the row
Returns
the row as a vector

Definition at line 440 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at().

Referenced by WMatrixFixedTest::testGetRowVector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ identity()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
static MatrixType WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::identity ( )
inlinestatic

Returns an identity matrix.

Returns
the identity matrix.

Definition at line 310 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::zero().

Referenced by WManipulatorNormalize::getTransformationMatrix(), WManipulatorRotation::getTransformationMatrix(), WManipulatorScaling::getTransformationMatrix(), WManipulatorTranslation::getTransformationMatrix(), and WMDatasetManipulator::initMatrix().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator Eigen::Matrix< ValueT, Rows, Cols >()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator Eigen::Matrix< ValueT, Rows, Cols > ( ) const
inline

Conversion to a Eigen3 Matrix of same size and type.

Returns
eigen3 matrix

Definition at line 497 of file WMatrixFixed.h.

◆ operator osg::Matrixd()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator osg::Matrixd ( ) const
inline

Convert this matrix to a OSG Matrix of size 4x4.

This compiles only for 4x4 WMatrix types.

Returns
the OSG Matrix

Definition at line 587 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator()().

+ Here is the call graph for this function:

◆ operator osg::Vec2d()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator osg::Vec2d ( ) const
inline

Cast to OSG Vector.

This will only compile for matrices with only one col and 2 rows.

Returns
OSG vector.

Definition at line 515 of file WMatrixFixed.h.

◆ operator osg::Vec2f()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator osg::Vec2f ( ) const
inline

Cast to OSG Vector.

This will only compile for matrices with only one col and 3 or 4 rows.

Returns
OSG vector.

Definition at line 527 of file WMatrixFixed.h.

◆ operator osg::Vec3d()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator osg::Vec3d ( ) const
inline

Cast to OSG Vector.

This will only compile for matrices with only one col and 3 or 4 rows.

Returns
OSG vector.

Definition at line 539 of file WMatrixFixed.h.

◆ operator osg::Vec3f()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator osg::Vec3f ( ) const
inline

Cast to OSG Vector.

This will only compile for matrices with only one col and 3 or 4 rows.

Returns
OSG vector.

Definition at line 551 of file WMatrixFixed.h.

◆ operator osg::Vec4d()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator osg::Vec4d ( ) const
inline

Cast to OSG Vector.

This will only compile for matrices with only one col and 4 rows.

Returns
OSG vector.

Definition at line 563 of file WMatrixFixed.h.

◆ operator osg::Vec4f()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator osg::Vec4f ( ) const
inline

Cast to OSG Vector.

This will only compile for matrices with only one col and 4 rows.

Returns
OSG vector.

Definition at line 575 of file WMatrixFixed.h.

◆ operator WMatrixFixed< ResultValueType, Rows, Cols, ResultValueStore >()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename ResultValueType , ValueStoreTemplate ResultValueStore>
WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator WMatrixFixed< ResultValueType, Rows, Cols, ResultValueStore > ( ) const
inline

Cast to matrix of same size with different value type.

Template Parameters
ResultValueTyperesulting value type
ResultValueStoreresulting value store
Returns
the converted matrix.

Definition at line 628 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::m_values, and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::setValues().

+ Here is the call graph for this function:

◆ operator!=()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
bool WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator!= ( const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &  rhs) const
throw (
)
inline

Compares two matrices and returns true if they are not equal.

Template Parameters
RHSValueTthe value type of the argument
Parameters
rhsThe right hand side of the comparison
Returns
true if not equal.

Definition at line 1167 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator==().

+ Here is the call graph for this function:

◆ operator()() [1/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
ValueT& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator() ( size_t  row,
size_t  col 
)
throw (
)
inline

◆ operator()() [2/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
const ValueT& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator() ( size_t  row,
size_t  col 
) const
throw (
)
inline

Returns a reference to the component of an row and column in order to provide access to the component.

It does not check for validity of the indices. Use at for this.

Parameters
rowthe row, staring with 0
colthe column, starting with 0
Returns
A const reference to the component of an row and column

Definition at line 959 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::m_values.

◆ operator*() [1/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT >
WMatrixFixed< typename WTypeTraits::TypePromotion< ValueT, RHSValueT >::Result, Rows, Cols, ValueStoreT > WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator* ( const RHSValueT &  rhs) const
inline

Matrix-Scalar multiplication.

Template Parameters
RHSValueTthe integral type of the given scalar
Parameters
rhsthe scalar
Returns
The product of this matrix with the given scalar value.

Definition at line 809 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator()().

+ Here is the call graph for this function:

◆ operator*() [2/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , size_t RHSCols, ValueStoreTemplate RHSValueStoreT>
WMatrixFixed< typename WTypeTraits::TypePromotion< ValueT, RHSValueT >::Result, Rows, RHSCols, ValueStoreT > WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator* ( const WMatrixFixed< RHSValueT, Cols, RHSCols, RHSValueStoreT > &  rhs) const
inline

Matrix-Matrix multiplication.

The number of columns of this matrix and the rows of the other need to match.

Template Parameters
RHSValueTthe integral type of the given matrix
RHSColsthe number of columns of the given matrix. The number if rows must match the number of columns in this matrix
Parameters
rhsthe matrix
Returns
The product of the matrices

Definition at line 766 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator()().

Referenced by WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator/().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator*=() [1/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT >
void WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator*= ( const RHSValueT &  rhs)
inline

Matrix-Scalar multiplication with self-assignment.

Template Parameters
RHSValueTthe integral type of the given scalar
Parameters
rhsthe scalar

Definition at line 829 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator=().

+ Here is the call graph for this function:

◆ operator*=() [2/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
void WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator*= ( const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &  rhs)
inline

Matrix-Matrix multiplication with self-assignment.

Template Parameters
RHSValueTthe integral type of the given matrix
Parameters
rhsthe matrix

Definition at line 794 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator=().

+ Here is the call graph for this function:

◆ operator+()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
WMatrixFixed< typename WTypeTraits::TypePromotion< ValueT, RHSValueT >::Result, Rows, Cols, ValueStoreT > WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator+ ( const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &  rhs) const
inline

Matrix addition.

The number of columns and rows must be the same.

Template Parameters
RHSValueTthe integral type of the given matrix
Parameters
rhsthe matrix
Returns
The sum of the current and the given matrix

Definition at line 872 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator()().

+ Here is the call graph for this function:

◆ operator+=()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
void WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator+= ( const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &  rhs)
inline

Matrix addition with self-assignment.

Template Parameters
RHSValueTthe integral type of the given matrix
Parameters
rhsthe matrix

Definition at line 892 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator=().

+ Here is the call graph for this function:

◆ operator-()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
WMatrixFixed< typename WTypeTraits::TypePromotion< ValueT, RHSValueT >::Result, Rows, Cols, ValueStoreT > WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator- ( const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &  rhs) const
inline

Matrix subtraction.

The number of columns and rows must be the same.

Template Parameters
RHSValueTthe integral type of the given matrix
Parameters
rhsthe matrix
Returns
The difference of the current and the given matrix.

Definition at line 907 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator()().

+ Here is the call graph for this function:

◆ operator-=()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
void WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator-= ( const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &  rhs)
throw (
)
inline

Matrix subtraction with self-assignment.

Template Parameters
RHSValueTthe integral type of the given matrix
Parameters
rhsthe matrix

Definition at line 927 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator=().

+ Here is the call graph for this function:

◆ operator/()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT >
WMatrixFixed< typename WTypeTraits::TypePromotion< ValueT, RHSValueT >::Result, Rows, Cols, ValueStoreT > WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator/ ( const RHSValueT &  rhs) const
inline

Matrix-Scalar division.

Template Parameters
RHSValueTthe integral type of the given scalar
Parameters
rhsthe scalar
Returns
The matrix having all components divided by the scalar.

Definition at line 844 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator*().

+ Here is the call graph for this function:

◆ operator/=()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT >
void WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator/= ( const RHSValueT &  rhs)
inline

Matrix-Scalar division with self-assignmnet.

Template Parameters
RHSValueTthe integral type of the given scalar
Parameters
rhsthe scalar

Definition at line 857 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator=().

+ Here is the call graph for this function:

◆ operator<()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
bool WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator< ( const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &  rhs) const
throw (
)
inline

Compares two matrices and returns true if this is smaller than the specified one (component-wise).

Template Parameters
RHSValueTthe value type of the argument
Parameters
rhsThe right hand side of the comparison
Returns
true if this is less

Definition at line 1144 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator()().

+ Here is the call graph for this function:

◆ operator=()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
MatrixType& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator= ( const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &  rhs)
inline

Assigns the given argument matrix to this one.

If the types match, a reference is returned.

Template Parameters
RHSValueTthe value type of the source matrix.
Parameters
rhsThe right hand side of the assignment
Returns
This matrix.

Definition at line 745 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::m_values, and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::setValues().

Referenced by WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator*=(), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator+=(), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator-=(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator/=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator==()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
bool WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator== ( const WMatrixFixed< RHSValueT, Rows, Cols, RHSValueStoreT > &  rhs) const
throw (
)
inline

Compares two matrices and returns true if they are equal (component-wise).

Template Parameters
RHSValueTthe value type of the argument
Parameters
rhsThe right hand side of the comparison
Returns
true if equal

Definition at line 1122 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator()().

Referenced by WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator!=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator[]() [1/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
ValueT& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[] ( size_t  row)
throw (
)
inline

Returns a reference to the component of the first column to provide access to the component.

It does not check for validity of the indices. Use this for single-column matrices (i.e. vectors). For matrices with cols!=0, this will not compile.

Parameters
rowthe row, staring with 0
Returns
A reference to the component of the first column

Definition at line 972 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::m_values.

Referenced by WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed(), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::x(), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::y(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::z().

+ Here is the caller graph for this function:

◆ operator[]() [2/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
const ValueT& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[] ( size_t  row) const
throw (
)
inline

Returns a reference to the component of the first column to provide access to the component.

It does not check for validity of the indices. Use this for single-column matrices (i.e. vectors). For matrices with cols!=0, this will not compile.

Parameters
rowthe row, staring with 0
Returns
A const reference to the component of the first column

Definition at line 986 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::m_values.

◆ setColumnVector()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
void WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::setColumnVector ( size_t  index,
const WMatrixFixed< RHSValueT, Rows, 1, RHSValueStoreT > &  vec 
)
inline

Set a column to a specific vector.

Template Parameters
RHSValueTValue type of the given matrix
ValueStoreTValue store of the given matrix
Parameters
indexthe index of the column you want to set
vecthe values to set for the column

Definition at line 462 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at().

Referenced by WMatrixFixedTest::testSetColVector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setRowVector()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
void WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::setRowVector ( size_t  index,
const WMatrixFixed< RHSValueT, Rows, 1, RHSValueStoreT > &  vec 
)
inline

Set a row to a specific vector.

Template Parameters
RHSValueTValue type of the given matrix
ValueStoreTValue store of the given matrix
Parameters
indexthe index of the row you want to set
vecthe values to set for the row

Definition at line 425 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at().

Referenced by WMatrixFixedTest::testSetRowVector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValues()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename RHSValueT , ValueStoreTemplate RHSValueStoreT>
void WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::setValues ( const RHSValueStoreT< RHSValueT, Rows, Cols > &  values)
inlineprivate

◆ size()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
size_t WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::size ( ) const
inline

The number of entries.

Returns
the number of entries.

Definition at line 203 of file WMatrixFixed.h.

Referenced by WPrincipalComponentAnalysis::extractEigenData(), and WMReadSimpleTextLineData::load().

+ Here is the caller graph for this function:

◆ x() [1/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
ValueT& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::x ( )
throw (
)
inline

◆ x() [2/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
const ValueT& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::x ( ) const
throw (
)
inline

Access x element of vector.

Works only for matrices with Cols == 1.

Returns
x element

Definition at line 1054 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[]().

+ Here is the call graph for this function:

◆ y() [1/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
ValueT& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::y ( )
throw (
)
inline

◆ y() [2/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
const ValueT& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::y ( ) const
throw (
)
inline

Access y element of vector.

Works only for matrices with Cols == 1.

Returns
y element

Definition at line 1078 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[]().

+ Here is the call graph for this function:

◆ z() [1/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
ValueT& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::z ( )
throw (
)
inline

Access z element of vector.

Works only for matrices with Cols == 1.

Returns
z element

Definition at line 1090 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[]().

Referenced by WMReadVIM::load(), WDataCreatorFiberParallel::operator()(), WDataCreatorFiberRandom::operator()(), WDataCreatorFiberStar::operator()(), WDataCreatorTorus< T >::operator()(), WMReadVCL::readData(), WMWriteTracts::savePOVRay(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::WMatrixFixed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ z() [2/2]

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
const ValueT& WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::z ( ) const
throw (
)
inline

Access z element of vector.

Works only for matrices with Cols == 1.

Returns
z element

Definition at line 1102 of file WMatrixFixed.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::operator[]().

+ Here is the call graph for this function:

◆ zero()

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
static MatrixType WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::zero ( )
inlinestatic

Returns a zero-initialized matrix.

Returns
the matrix.

Definition at line 325 of file WMatrixFixed.h.

Referenced by WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::fromMatrix(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::identity().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ WMatrixFixed

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
template<typename ValueTT , size_t Rowss, size_t Colss, ValueStoreTemplate ValueStoreTT>
friend class WMatrixFixed
friend

This is needed for access to the storage object of another matrix.

Definition at line 156 of file WMatrixFixed.h.

◆ WMatrixFixedTest

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
friend class WMatrixFixedTest
friend

Access for test class.

Definition at line 152 of file WMatrixFixed.h.

Member Data Documentation

◆ m_values

template<typename ValueT , size_t Rows, size_t Cols, ValueStoreTemplate ValueStoreT = ValueStore>
ValueStoreType WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::m_values
private

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