MatrixView_< ELT > Class Template Reference

This class is identical to a Matrix_; it is used only to manage the C++ rules for when copy constructors are called by introducing a separate type to prevent certain allowed optimizations from occuring when we don't want them. More...

#include <BigMatrix.h>

Inheritance diagram for MatrixView_< ELT >:
MatrixBase< ELT > DeadMatrixView_< ELT >

List of all members.

Public Member Functions

 MatrixView_ (MatrixHelperRep< S > *hrep)
 MatrixView_ (const MatrixView_ &m)
MatrixView_operator= (const MatrixView_ &m)
 MatrixView_ (DeadMatrixView_< ELT > &)
MatrixView_operator= (DeadMatrixView_< ELT > &)
 MatrixView_ (const MatrixHelper< S > &h)
 MatrixView_ (MatrixHelper< S > &h)
MatrixView_operator= (const Matrix_< ELT > &v)
MatrixView_operator= (const ELT &e)
 Matrix assignment to an element sets only the *diagonal* elements to the indicated value; everything else is set to zero.
template<class EE >
MatrixView_operator= (const MatrixBase< EE > &m)
template<class EE >
MatrixView_operator+= (const MatrixBase< EE > &m)
template<class EE >
MatrixView_operator-= (const MatrixBase< EE > &m)
MatrixView_operator*= (const StdNumber &t)
MatrixView_operator/= (const StdNumber &t)
MatrixView_operator+= (const ELT &r)
MatrixView_operator-= (const ELT &r)
 operator const Matrix_< ELT > & () const
 operator Matrix_< ELT > & ()

Detailed Description

template<class ELT>
class SimTK::MatrixView_< ELT >

This class is identical to a Matrix_; it is used only to manage the C++ rules for when copy constructors are called by introducing a separate type to prevent certain allowed optimizations from occuring when we don't want them.

Despite the name, this may be an owner if a Matrix_ is recast to a MatrixView_. However, there are no owner constructors for MatrixView_.


Constructor & Destructor Documentation

MatrixView_ ( MatrixHelperRep< S > *  hrep  )  [inline, explicit]
MatrixView_ ( const MatrixView_< ELT > &  m  )  [inline]
MatrixView_ ( DeadMatrixView_< ELT > &  dead  )  [inline]
MatrixView_ ( const MatrixHelper< S > &  h  )  [inline]
MatrixView_ ( MatrixHelper< S > &  h  )  [inline]

Member Function Documentation

operator const Matrix_< ELT > & (  )  const [inline]
operator Matrix_< ELT > & (  )  [inline]
MatrixView_& operator*= ( const StdNumber &  t  )  [inline]
MatrixView_& operator+= ( const ELT &  r  )  [inline]
MatrixView_& operator+= ( const MatrixBase< EE > &  m  )  [inline]
MatrixView_& operator-= ( const ELT &  r  )  [inline]
MatrixView_& operator-= ( const MatrixBase< EE > &  m  )  [inline]
MatrixView_& operator/= ( const StdNumber &  t  )  [inline]
MatrixView_& operator= ( const MatrixBase< EE > &  m  )  [inline]
MatrixView_& operator= ( const ELT &  t  )  [inline]

Matrix assignment to an element sets only the *diagonal* elements to the indicated value; everything else is set to zero.

This is particularly useful for setting a Matrix to zero or to the identity; for other values it creates a Matrix which acts like the scalar. That is, if the scalar is s and we do M=s, then multiplying another Matrix B by the resulting diagonal matrix M gives the same result as multiplying B by s. That is (M=s)*B == s*B.

NOTE: this must be overridden for Vector and RowVector since then scalar assignment is defined to copy the scalar to every element.

Reimplemented from MatrixBase< ELT >.

Reimplemented in DeadMatrixView_< ELT >.

References MatrixBase< ELT >::operator=().

MatrixView_& operator= ( const Matrix_< ELT > &  v  )  [inline]
MatrixView_< ELT > & operator= ( DeadMatrixView_< ELT > &  dead  )  [inline]
MatrixView_& operator= ( const MatrixView_< ELT > &  m  )  [inline]

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

Generated on Wed Dec 30 11:05:21 2009 for SimTKcore by  doxygen 1.6.1