AbstractLinAlgPack::MatrixDenseTriEncap Class Reference

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

#include <AbstractLinAlgPack_MatrixOpGetGMSTri.hpp>

List of all members.

Public Member Functions

 MatrixDenseTriEncap (const MatrixOpGetGMSTri &mat_get)
 Construct a DenseLinAlgPack::DMatrixSliceTri view from a MatrixOpGetGMSTri object.
 MatrixDenseTriEncap (const MatrixOp &mat)
 Construct a DenseLinAlgPack::DMatrixSliceTri view from a MatrixOp object.
 ~MatrixDenseTriEncap ()
 Frees the DenseLinAlgPack::DMatrixSliceTri view.
const
DenseLinAlgPack::DMatrixSliceTri 
operator() () const
 Returns a constant view of the DenseLinAlgPack::DMatrixSliceTri view.

Private Member Functions

 MatrixDenseTriEncap ()
 MatrixDenseTriEncap (const MatrixDenseTriEncap &)
MatrixDenseTriEncapoperator= (const MatrixDenseTriEncap &)

Private Attributes

const MatrixOpGetGMSTrimat_get_
const
DenseLinAlgPack::DMatrixSliceTri 
tri_gms_view_

Detailed Description

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

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

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

 void call_func(const MatrixOpGetGMSTri& mat_in ) {
     func( MatrixDenseTriEncap(mat_in)() );
 }

In the above code, if the underlying MatrixOpGetGMSTri object does not have to perform any dynamic memory allocations and copy in the method MatrixOpGetGMSTri::get_tri_gms_view() then the above code will only have a constant time overhead.

Definition at line 112 of file AbstractLinAlgPack_MatrixOpGetGMSTri.hpp.


Constructor & Destructor Documentation

AbstractLinAlgPack::MatrixDenseTriEncap::MatrixDenseTriEncap ( const MatrixOpGetGMSTri mat_get  )  [inline]

Construct a DenseLinAlgPack::DMatrixSliceTri view from a MatrixOpGetGMSTri object.

Definition at line 145 of file AbstractLinAlgPack_MatrixOpGetGMSTri.hpp.

AbstractLinAlgPack::MatrixDenseTriEncap::MatrixDenseTriEncap ( const MatrixOp mat  )  [inline]

Construct a DenseLinAlgPack::DMatrixSliceTri view from a MatrixOp object.

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

Definition at line 151 of file AbstractLinAlgPack_MatrixOpGetGMSTri.hpp.

AbstractLinAlgPack::MatrixDenseTriEncap::~MatrixDenseTriEncap (  )  [inline]
AbstractLinAlgPack::MatrixDenseTriEncap::MatrixDenseTriEncap (  )  [private]
AbstractLinAlgPack::MatrixDenseTriEncap::MatrixDenseTriEncap ( const MatrixDenseTriEncap  )  [private]

Member Function Documentation

const DenseLinAlgPack::DMatrixSliceTri AbstractLinAlgPack::MatrixDenseTriEncap::operator() (  )  const [inline]

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

Definition at line 163 of file AbstractLinAlgPack_MatrixOpGetGMSTri.hpp.

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

Member Data Documentation

Definition at line 131 of file AbstractLinAlgPack_MatrixOpGetGMSTri.hpp.

Definition at line 132 of file AbstractLinAlgPack_MatrixOpGetGMSTri.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:17:31 2011 for MOOCHO (Single Doxygen Collection) by  doxygen 1.6.3