MULTIBODY SIMULATION SOFTWARE - API documentation

chrono::ChMatrixNM< Real, preall_rows, preall_columns > Class Template Reference

#include <CHmatrix.h>

Inheritance diagram for chrono::ChMatrixNM< Real, preall_rows, preall_columns >:

Inheritance graph
[legend]
Collaboration diagram for chrono::ChMatrixNM< Real, preall_rows, preall_columns >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChMatrixNM ()
 ChMatrixNM (const ChMatrixNM< Real, preall_rows, preall_columns > &msource)
template<class RealB>
 ChMatrixNM (const ChMatrix< RealB > &msource)
virtual ~ChMatrixNM ()
ChMatrixNM< Real,
preall_rows,
preall_columns > & 
operator= (const ChMatrix< Real > &matbis)
ChMatrixNM< Real,
preall_rows,
preall_columns > 
operator- ()
template<class RealB>
ChMatrixNM< Real,
preall_rows,
preall_columns > 
operator+ (const ChMatrix< RealB > &matbis)
template<class RealB>
ChMatrixNM< Real,
preall_rows,
preall_columns > 
operator- (const ChMatrix< RealB > &matbis)
template<class RealB, int B_rows, int B_columns>
ChMatrixNM< Real,
preall_rows,
B_columns > 
operator * (const ChMatrixNM< RealB, preall_columns, B_columns > &matbis)
template<class RealB>
ChMatrixDynamic< Real > operator * (const ChMatrix< RealB > &matbis)
ChMatrixNM< Real,
preall_rows,
preall_columns > 
operator * (const Real factor)
virtual void Resize (int nrows, int ncols)

Protected Attributes

Real buffer [preall_rows *preall_columns]


Detailed Description

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
class chrono::ChMatrixNM< Real, preall_rows, preall_columns >

ChMatrixNM

Specialized matrix class having a pre-allocated NxM buffer of elements on stack. This means that elements are put the stack when the matrix is created, and this can be more efficient than heap allocation (but, please, do not use too large N or M sizes, this is meant to work up to 10x10, for example; prefer ChMatrixDyamic for larger). The NxM size must be known 'statically', at compile-time; however later at run-time this matrix can be resized anyway (but for larger size than NxM, it falls back to heap allocation). Note that if resizing is often required, it may be better to create a ChMatrixDyamic instead, from the beginning.


Constructor & Destructor Documentation

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
chrono::ChMatrixNM< Real, preall_rows, preall_columns >::ChMatrixNM (  ) 

The default constructor builds a NxN matrix,.

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
chrono::ChMatrixNM< Real, preall_rows, preall_columns >::ChMatrixNM ( const ChMatrixNM< Real, preall_rows, preall_columns > &  msource  ) 

Copy constructor.

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
template<class RealB>
chrono::ChMatrixNM< Real, preall_rows, preall_columns >::ChMatrixNM ( const ChMatrix< RealB > &  msource  ) 

Copy constructor from all types of base matrices (only with same size).

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
virtual chrono::ChMatrixNM< Real, preall_rows, preall_columns >::~ChMatrixNM (  )  [virtual]

Destructor.


Member Function Documentation

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
ChMatrixNM<Real,preall_rows,preall_columns>& chrono::ChMatrixNM< Real, preall_rows, preall_columns >::operator= ( const ChMatrix< Real > &  matbis  ) 

Assignment operator (from generic other matrix, acceptable only if other matrix has same size).

Reimplemented from chrono::ChMatrix< Real >.

Reimplemented in chrono::ChMatrix33< Real >.

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
ChMatrixNM<Real,preall_rows,preall_columns> chrono::ChMatrixNM< Real, preall_rows, preall_columns >::operator- (  ) 

Negates sign of the matrix. Performance warning: a new object is created.

Reimplemented in chrono::ChMatrix33< Real >, chrono::ChMatrix33< double >, and chrono::ChMatrix33< float >.

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
template<class RealB>
ChMatrixNM<Real,preall_rows,preall_columns> chrono::ChMatrixNM< Real, preall_rows, preall_columns >::operator+ ( const ChMatrix< RealB > &  matbis  ) 

Sums this matrix and another matrix (of same size) Performance warning: a new object is created.

Reimplemented in chrono::ChMatrix33< Real >, chrono::ChMatrix33< double >, and chrono::ChMatrix33< float >.

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
template<class RealB>
ChMatrixNM<Real,preall_rows,preall_columns> chrono::ChMatrixNM< Real, preall_rows, preall_columns >::operator- ( const ChMatrix< RealB > &  matbis  ) 

Subtracts this matrix and another matrix (of same size). Performance warning: a new object is created.

Reimplemented in chrono::ChMatrix33< Real >, chrono::ChMatrix33< double >, and chrono::ChMatrix33< float >.

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
template<class RealB, int B_rows, int B_columns>
ChMatrixNM<Real,preall_rows,B_columns> chrono::ChMatrixNM< Real, preall_rows, preall_columns >::operator * ( const ChMatrixNM< RealB, preall_columns, B_columns > &  matbis  ) 

Multiplies this matrix and another ChMatrixNM matrix. This is optimized: it returns another ChMatrixMN because size of matbis is known statically. Performance warning: a new object is created.

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
template<class RealB>
ChMatrixDynamic<Real> chrono::ChMatrixNM< Real, preall_rows, preall_columns >::operator * ( const ChMatrix< RealB > &  matbis  ) 

Multiplies this matrix and another generic matrix. Returns a ChMatrixDynamic matrix, because size of matbis is not known at compile time. Performance warning: a new object is created.

Reimplemented in chrono::ChMatrix33< Real >, chrono::ChMatrix33< double >, and chrono::ChMatrix33< float >.

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
ChMatrixNM<Real,preall_rows,preall_columns> chrono::ChMatrixNM< Real, preall_rows, preall_columns >::operator * ( const Real  factor  ) 

Multiplies this matrix by a scalar value Performance warning: a new object is created.

Reimplemented in chrono::ChMatrix33< Real >.

template<class Real = double, int preall_rows = 3, int preall_columns = 3>
virtual void chrono::ChMatrixNM< Real, preall_rows, preall_columns >::Resize ( int  nrows,
int  ncols 
) [virtual]

Resize for this matrix is NOT SUPPORTED ! DO NOTHING!

Implements chrono::ChMatrix< Real >.


CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on 17 Jul 2009 by Doxygen