AbstractLinAlgPack::MatrixDenseSymEncap Class Reference

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

#include <AbstractLinAlgPack_MatrixSymOpGetGMSSym.hpp>

List of all members.

Public Member Functions

 MatrixDenseSymEncap (const MatrixSymOpGetGMSSym &mat_get)
 Construct a DenseLinAlgPack::DMatrixSliceSym view from a MatrixSymOpGetGMSSym object.
 MatrixDenseSymEncap (const MatrixSymOp &mat)
 Construct a DenseLinAlgPack::DMatrixSliceSym view from a MatrixSymOp object.
 ~MatrixDenseSymEncap ()
 Frees the DenseLinAlgPack::DMatrixSliceSym view.
const DenseLinAlgPack::DMatrixSliceSym operator() () const
 Returns a constant view of the DenseLinAlgPack::DMatrixSliceSym view.

Private Member Functions

 MatrixDenseSymEncap ()
 MatrixDenseSymEncap (const MatrixDenseSymEncap &)
MatrixDenseSymEncapoperator= (const MatrixDenseSymEncap &)

Private Attributes

const MatrixSymOpGetGMSSymmat_get_
const DenseLinAlgPack::DMatrixSliceSym sym_gms_view_


Detailed Description

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

This takes care of worrying about if the MatrixSymOpGetGMSSym 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 call another function one could write a function like:

 void call_func(const MatrixSymOpGetGMSSym& mat_in ) {
     func( MatrixDenseSymEncap(mat_in)() );
 }
In the above code, if the underlying MatrixSymOpGetGMSSym object does not have to perform any dynamic memory allocations and copy in the method MatrixSymOpGetGMSSym::get_sym_gms_view() then the above code will only have a constant time overhead.

Definition at line 112 of file AbstractLinAlgPack_MatrixSymOpGetGMSSym.hpp.


Constructor & Destructor Documentation

AbstractLinAlgPack::MatrixDenseSymEncap::MatrixDenseSymEncap ( const MatrixSymOpGetGMSSym mat_get  )  [inline]

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

Definition at line 145 of file AbstractLinAlgPack_MatrixSymOpGetGMSSym.hpp.

AbstractLinAlgPack::MatrixDenseSymEncap::MatrixDenseSymEncap ( const MatrixSymOp mat  )  [inline]

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

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

Definition at line 151 of file AbstractLinAlgPack_MatrixSymOpGetGMSSym.hpp.

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

Frees the DenseLinAlgPack::DMatrixSliceSym view.

Definition at line 157 of file AbstractLinAlgPack_MatrixSymOpGetGMSSym.hpp.

AbstractLinAlgPack::MatrixDenseSymEncap::MatrixDenseSymEncap (  )  [private]

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


Member Function Documentation

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

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

Definition at line 163 of file AbstractLinAlgPack_MatrixSymOpGetGMSSym.hpp.

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


Member Data Documentation

const MatrixSymOpGetGMSSym& AbstractLinAlgPack::MatrixDenseSymEncap::mat_get_ [private]

Definition at line 131 of file AbstractLinAlgPack_MatrixSymOpGetGMSSym.hpp.

const DenseLinAlgPack::DMatrixSliceSym AbstractLinAlgPack::MatrixDenseSymEncap::sym_gms_view_ [private]

Definition at line 132 of file AbstractLinAlgPack_MatrixSymOpGetGMSSym.hpp.


The documentation for this class was generated from the following file:
Generated on Wed May 12 21:57:07 2010 for MOOCHO (Single Doxygen Collection) by  doxygen 1.4.7