AbstractLinAlgPack::MatrixDenseSymMutableEncap Class Reference

Helper class type that simplifies the usage of the MatrixSymOpGetGMSSymMutable interface for clients. More...

#include <AbstractLinAlgPack_MatrixSymOpGetGMSSymMutable.hpp>

List of all members.

Public Member Functions

 MatrixDenseSymMutableEncap (MatrixSymOpGetGMSSymMutable *mat_get)
 Construct a DenseLinAlgPack::DMatrixSliceSym view from a MatrixSymOpGetGMSSymMutable object.
 MatrixDenseSymMutableEncap (MatrixSymOp *mat)
 Construct a DenseLinAlgPack::DMatrixSliceSym view from a MatrixSymOp object.
 ~MatrixDenseSymMutableEncap ()
 Frees the DenseLinAlgPack::DMatrixSliceSym view and commits the changes.
DenseLinAlgPack::DMatrixSliceSym operator() ()
 Returns a non-const view of the DenseLinAlgPack::DMatrixSliceSym view.
const DenseLinAlgPack::DMatrixSliceSym operator() () const
 Returns a const view of the DenseLinAlgPack::DMatrixSliceSym view.

Private Member Functions

 MatrixDenseSymMutableEncap ()
 MatrixDenseSymMutableEncap (const MatrixDenseSymMutableEncap &)
MatrixDenseSymMutableEncapoperator= (const MatrixDenseSymMutableEncap &)

Private Attributes

MatrixSymOpGetGMSSymMutablemat_get_
DenseLinAlgPack::DMatrixSliceSym sym_gms_view_


Detailed Description

Helper class type that simplifies the usage of the MatrixSymOpGetGMSSymMutable interface for clients.

This takes care of worrying about if the MatrixSymOpGetGMSSymMutable interface is supported or not and remembering to free the DenseLinAlgPack::DMatrixSliceSym view properly.

This class is only to be used on the stack as an automatic variable. For example, to extract a DenseLinAlgPack::DMatrixSliceSym view of an abstract vector and use it to set the matrix to a scalar one could write a function like:

 void assign( const value_type alpha, MatrixSymOpGetGMSSymMutable* mat_inout ) {
     MatrixDenseSymMutableEncap  gms_inout(*mat_inout);
   gms_inout() = alpha;
 }
In the above code, if the underlying MatrixSymOpGetGMSSymMutable object does not have to perform any dynamic memory allocations and copy in the method MatrixSymOpGetGMSSymMutable::get_sym_gms_view() then the above code will only have a constant time overhead.

Definition at line 110 of file AbstractLinAlgPack_MatrixSymOpGetGMSSymMutable.hpp.


Constructor & Destructor Documentation

AbstractLinAlgPack::MatrixDenseSymMutableEncap::MatrixDenseSymMutableEncap ( MatrixSymOpGetGMSSymMutable mat_get  )  [inline]

Construct a DenseLinAlgPack::DMatrixSliceSym view from a MatrixSymOpGetGMSSymMutable object.

Definition at line 145 of file AbstractLinAlgPack_MatrixSymOpGetGMSSymMutable.hpp.

AbstractLinAlgPack::MatrixDenseSymMutableEncap::MatrixDenseSymMutableEncap ( MatrixSymOp mat  )  [inline]

Construct a DenseLinAlgPack::DMatrixSliceSym view from a MatrixSymOp object.

If dynamic_cast<MatrixSymOpGetGMSSymMutable*>(mat) == NULL then a ??? exception is thrown.

Definition at line 151 of file AbstractLinAlgPack_MatrixSymOpGetGMSSymMutable.hpp.

AbstractLinAlgPack::MatrixDenseSymMutableEncap::~MatrixDenseSymMutableEncap (  )  [inline]

Frees the DenseLinAlgPack::DMatrixSliceSym view and commits the changes.

Definition at line 157 of file AbstractLinAlgPack_MatrixSymOpGetGMSSymMutable.hpp.

AbstractLinAlgPack::MatrixDenseSymMutableEncap::MatrixDenseSymMutableEncap (  )  [private]

AbstractLinAlgPack::MatrixDenseSymMutableEncap::MatrixDenseSymMutableEncap ( const MatrixDenseSymMutableEncap  )  [private]


Member Function Documentation

DenseLinAlgPack::DMatrixSliceSym AbstractLinAlgPack::MatrixDenseSymMutableEncap::operator() (  )  [inline]

Returns a non-const view of the DenseLinAlgPack::DMatrixSliceSym view.

Definition at line 163 of file AbstractLinAlgPack_MatrixSymOpGetGMSSymMutable.hpp.

const DenseLinAlgPack::DMatrixSliceSym AbstractLinAlgPack::MatrixDenseSymMutableEncap::operator() (  )  const [inline]

Returns a const view of the DenseLinAlgPack::DMatrixSliceSym view.

Definition at line 169 of file AbstractLinAlgPack_MatrixSymOpGetGMSSymMutable.hpp.

MatrixDenseSymMutableEncap& AbstractLinAlgPack::MatrixDenseSymMutableEncap::operator= ( const MatrixDenseSymMutableEncap  )  [private]


Member Data Documentation

MatrixSymOpGetGMSSymMutable* AbstractLinAlgPack::MatrixDenseSymMutableEncap::mat_get_ [private]

Definition at line 131 of file AbstractLinAlgPack_MatrixSymOpGetGMSSymMutable.hpp.

DenseLinAlgPack::DMatrixSliceSym AbstractLinAlgPack::MatrixDenseSymMutableEncap::sym_gms_view_ [private]

Definition at line 132 of file AbstractLinAlgPack_MatrixSymOpGetGMSSymMutable.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Oct 20 12:54:08 2009 for MOOCHO (Single Doxygen Collection) by doxygen 1.4.7