AbstractLinAlgPack::MultiVectorMutableDense Class Reference

MultiVectorMutable "Adapter" subclass for DenseLinAlgPack::DMatrixSlice or DenseLinAlgPack::DMatrix object. More...

#include <AbstractLinAlgPack_MultiVectorMutableDense.hpp>

Inheritance diagram for AbstractLinAlgPack::MultiVectorMutableDense:

Inheritance graph
[legend]
List of all members.

Constructors / initializers

 MultiVectorMutableDense (const size_type rows=0, const size_type cols=0)
 Calls this->initialize(rows,cols).
 MultiVectorMutableDense (DMatrixSlice gms, BLAS_Cpp::Transp gms_trans, const release_resource_ptr_t &gms_release)
 Calls this->initialize(gms,gms_trans,gms_release).
void initialize (const size_type rows, const size_type cols)
 Call this->initialize(v,v_release) with an allocated DenseLinAlgPack::DVector object.
void initialize (DMatrixSlice gms, BLAS_Cpp::Transp gms_trans, const release_resource_ptr_t &gms_release)
 Initialize with a dense matrix slice.

Access

DMatrixSlice set_gms ()
 Return the non-const dense matrix.
const DMatrixSlice get_gms () const
 Return a const dense matrix.
BLAS_Cpp::Transp gms_trans () const
 Return if underlying matrix is being viewed as the transpose or non-transposed.
const release_resource_ptr_tgms_release () const
 Return a RCP<> pointer to the object that will release the associated resource.

Overridden from MatrixOpGetGMS

const DMatrixSlice get_gms_view () const
 
void free_gms_view (const DMatrixSlice *gms_view) const
 

Overridden from MatrixOpGetGMSMutable

DMatrixSlice get_gms_view ()
 
void commit_gms_view (DMatrixSlice *gms_view)
 

Overridden from MatrixBase

size_type rows () const
 
size_type cols () const
 

Overridden from MatrixOp

void zero_out ()
 
void Mt_S (value_type alpha)
 
MatrixOpoperator= (const MatrixOp &mwo_rhs)
 
std::ostream & output (std::ostream &out) const
 
bool Mp_StM (MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs) const
 
bool Mp_StM (value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs)
 
bool syrk (BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta, MatrixSymOp *sym_lhs) const
 
bool Mp_StMtM (MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, BLAS_Cpp::Transp trans_rhs2, value_type beta) const
 
bool Mp_StMtM (MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta) const
 

Overridden from MultiVector

access_by_t access_by () const
 

Overridden from MultiVectorMutable

vec_mut_ptr_t col (index_type j)
 
vec_mut_ptr_t row (index_type i)
 
vec_mut_ptr_t diag (int k)
 
multi_vec_mut_ptr_t mv_sub_view (const Range1D &row_rng, const Range1D &col_rng)
 

Overridden from MatrixOpSerial

void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2, value_type beta) const
 
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2, value_type beta) const
 

Overridden from MultiVector

void apply_op (EApplyBy apply_by, const RTOpPack::RTOp &primary_op, const size_t num_multi_vecs, const MultiVector **multi_vecs, const size_t num_targ_multi_vecs, MultiVectorMutable **targ_multi_vecs, RTOpPack::ReductTarget *reduct_objs[], const index_type primary_first_ele, const index_type primary_sub_dim, const index_type primary_global_offset, const index_type secondary_first_ele, const index_type secondary_sub_dim) const
 
void apply_op (EApplyBy apply_by, const RTOpPack::RTOp &primary_op, const RTOpPack::RTOp &secondary_op, const size_t num_multi_vecs, const MultiVector **multi_vecs, const size_t num_targ_multi_vecs, MultiVectorMutable **targ_multi_vecs, RTOpPack::ReductTarget *reduct_obj, const index_type primary_first_ele, const index_type primary_sub_dim, const index_type primary_global_offset, const index_type secondary_first_ele, const index_type secondary_sub_dim) const
 

Public Types

typedef Teuchos::RCP< MemMngPack::ReleaseResourcerelease_resource_ptr_t
 

Detailed Description

MultiVectorMutable "Adapter" subclass for DenseLinAlgPack::DMatrixSlice or DenseLinAlgPack::DMatrix object.

This class can be used either as a view of a DenseLinAlgPack::DMatrixSlice object or as a storage type for a DenseLinAlgPack::DMatrix object.

To create a storage type with the dimensions of rows x cols just call the constructor MatrixWithOpMutableDense(rows,cols) or after construction you can call this->initialize(rows,cols).

To simply create a view of a matrix or its transpose, say M, without ownership just call MatrixWithOpMutableDense(M(),M_trans,NULL) or after construction call this->initialize(M(),M_trans,NULL).

Alternately, this can be given a matrix with the responsibility to delete any associated memory by calling this->initialize() with a ReleaseResource object to perform the deallocation.

If this has been initialized by this->initialize(rows,cols) and if the client really needs to get at the DenseLinAlgPack::DMatrix object itself, then it can be obtained as:

 DMatrix* f( MultiVectorMutableDense* M )
 {
     return dynamic_cast<MemMngPack::ReleaseResource_ref_count_ptr<DMatrix&> >(*M.gms_release()).ptr.get();
 }
This is not pretty but it is not supposed to be. Of course the above function will return NULL the dynamic_cast<> fails or if there is no allocated DMatrix object to get.

Definition at line 70 of file AbstractLinAlgPack_MultiVectorMutableDense.hpp.


Member Typedef Documentation

typedef Teuchos::RCP< MemMngPack::ReleaseResource> AbstractLinAlgPack::MultiVectorMutableDense::release_resource_ptr_t

Definition at line 79 of file AbstractLinAlgPack_MultiVectorMutableDense.hpp.


Constructor & Destructor Documentation

AbstractLinAlgPack::MultiVectorMutableDense::MultiVectorMutableDense ( const size_type  rows = 0,
const size_type  cols = 0 
)

Calls this->initialize(rows,cols).

Definition at line 45 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

AbstractLinAlgPack::MultiVectorMutableDense::MultiVectorMutableDense ( DMatrixSlice  gms,
BLAS_Cpp::Transp  gms_trans,
const release_resource_ptr_t gms_release 
)

Calls this->initialize(gms,gms_trans,gms_release).

Definition at line 53 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.


Member Function Documentation

void AbstractLinAlgPack::MultiVectorMutableDense::initialize ( const size_type  rows,
const size_type  cols 
)

Call this->initialize(v,v_release) with an allocated DenseLinAlgPack::DVector object.

Definition at line 62 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

void AbstractLinAlgPack::MultiVectorMutableDense::initialize ( DMatrixSlice  gms,
BLAS_Cpp::Transp  gms_trans,
const release_resource_ptr_t gms_release 
)

Initialize with a dense matrix slice.

Note that solve of the method overrides have to allocate a temporary memory if gms_trans != no_trans (see get_gms_view() and output()).

Postconditions:

Definition at line 82 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

DMatrixSlice AbstractLinAlgPack::MultiVectorMutableDense::set_gms (  )  [inline]

Return the non-const dense matrix.

Note that calling this method may result in the matrix implementation being modified. Therefore, no other methods on this object should be called until the DMatrixSlice returned from this method is discarded.

Definition at line 296 of file AbstractLinAlgPack_MultiVectorMutableDense.hpp.

const DMatrixSlice AbstractLinAlgPack::MultiVectorMutableDense::get_gms (  )  const [inline]

Return a const dense matrix.

Definition at line 303 of file AbstractLinAlgPack_MultiVectorMutableDense.hpp.

BLAS_Cpp::Transp AbstractLinAlgPack::MultiVectorMutableDense::gms_trans (  )  const [inline]

Return if underlying matrix is being viewed as the transpose or non-transposed.

Definition at line 310 of file AbstractLinAlgPack_MultiVectorMutableDense.hpp.

const MultiVectorMutableDense::release_resource_ptr_t & AbstractLinAlgPack::MultiVectorMutableDense::gms_release (  )  const [inline]

Return a RCP<> pointer to the object that will release the associated resource.

Definition at line 317 of file AbstractLinAlgPack_MultiVectorMutableDense.hpp.

const DMatrixSlice AbstractLinAlgPack::MultiVectorMutableDense::get_gms_view (  )  const [virtual]

Implements AbstractLinAlgPack::MatrixOpGetGMS.

Definition at line 95 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

void AbstractLinAlgPack::MultiVectorMutableDense::free_gms_view ( const DMatrixSlice gms_view  )  const [virtual]

Implements AbstractLinAlgPack::MatrixOpGetGMS.

Definition at line 103 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

DMatrixSlice AbstractLinAlgPack::MultiVectorMutableDense::get_gms_view (  ) 

Definition at line 115 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

void AbstractLinAlgPack::MultiVectorMutableDense::commit_gms_view ( DMatrixSlice gms_view  ) 

Definition at line 123 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

size_type AbstractLinAlgPack::MultiVectorMutableDense::rows (  )  const [virtual]

Reimplemented from AbstractLinAlgPack::MatrixBase.

Definition at line 188 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

size_type AbstractLinAlgPack::MultiVectorMutableDense::cols (  )  const [virtual]

Reimplemented from AbstractLinAlgPack::MatrixBase.

Definition at line 193 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

void AbstractLinAlgPack::MultiVectorMutableDense::zero_out (  )  [virtual]

Reimplemented from AbstractLinAlgPack::MultiVectorMutable.

Definition at line 200 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

void AbstractLinAlgPack::MultiVectorMutableDense::Mt_S ( value_type  alpha  )  [virtual]

Reimplemented from AbstractLinAlgPack::MultiVectorMutable.

Definition at line 205 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

MatrixOp & AbstractLinAlgPack::MultiVectorMutableDense::operator= ( const MatrixOp mwo_rhs  )  [virtual]

Reimplemented from AbstractLinAlgPack::MultiVectorMutable.

Definition at line 210 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

std::ostream & AbstractLinAlgPack::MultiVectorMutableDense::output ( std::ostream &  out  )  const [virtual]

Reimplemented from AbstractLinAlgPack::MatrixOpSerial.

Definition at line 216 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

bool AbstractLinAlgPack::MultiVectorMutableDense::Mp_StM ( MatrixOp mwo_lhs,
value_type  alpha,
BLAS_Cpp::Transp  trans_rhs 
) const [virtual]

Reimplemented from AbstractLinAlgPack::MultiVectorMutable.

Definition at line 223 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

bool AbstractLinAlgPack::MultiVectorMutableDense::Mp_StM ( value_type  alpha,
const MatrixOp M_rhs,
BLAS_Cpp::Transp  trans_rhs 
) [virtual]

Reimplemented from AbstractLinAlgPack::MultiVectorMutable.

Definition at line 231 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

bool AbstractLinAlgPack::MultiVectorMutableDense::syrk ( BLAS_Cpp::Transp  M_trans,
value_type  alpha,
value_type  beta,
MatrixSymOp sym_lhs 
) const [virtual]

Reimplemented from AbstractLinAlgPack::MatrixOpSerial.

Definition at line 238 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

bool AbstractLinAlgPack::MultiVectorMutableDense::Mp_StMtM ( MatrixOp mwo_lhs,
value_type  alpha,
const MatrixOp mwo_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
BLAS_Cpp::Transp  trans_rhs2,
value_type  beta 
) const [virtual]

Reimplemented from AbstractLinAlgPack::MatrixOp.

Definition at line 257 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

bool AbstractLinAlgPack::MultiVectorMutableDense::Mp_StMtM ( MatrixOp mwo_lhs,
value_type  alpha,
BLAS_Cpp::Transp  trans_rhs1,
const MatrixOp mwo_rhs2,
BLAS_Cpp::Transp  trans_rhs2,
value_type  beta 
) const [virtual]

Reimplemented from AbstractLinAlgPack::MatrixOpSerial.

Definition at line 268 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

MultiVectorMutableDense::access_by_t AbstractLinAlgPack::MultiVectorMutableDense::access_by (  )  const [virtual]

Implements AbstractLinAlgPack::MultiVector.

Definition at line 136 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

MultiVectorMutableDense::vec_mut_ptr_t AbstractLinAlgPack::MultiVectorMutableDense::col ( index_type  j  )  [virtual]

Implements AbstractLinAlgPack::MultiVectorMutable.

Definition at line 144 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

MultiVectorMutableDense::vec_mut_ptr_t AbstractLinAlgPack::MultiVectorMutableDense::row ( index_type  i  )  [virtual]

Implements AbstractLinAlgPack::MultiVectorMutable.

Definition at line 154 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

MultiVectorMutableDense::vec_mut_ptr_t AbstractLinAlgPack::MultiVectorMutableDense::diag ( int  k  )  [virtual]

Implements AbstractLinAlgPack::MultiVectorMutable.

Definition at line 164 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

MultiVectorMutableDense::multi_vec_mut_ptr_t AbstractLinAlgPack::MultiVectorMutableDense::mv_sub_view ( const Range1D row_rng,
const Range1D col_rng 
) [virtual]

Reimplemented from AbstractLinAlgPack::MultiVectorMutable.

Definition at line 174 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

void AbstractLinAlgPack::MultiVectorMutableDense::Vp_StMtV ( DVectorSlice vs_lhs,
value_type  alpha,
BLAS_Cpp::Transp  trans_rhs1,
const DVectorSlice vs_rhs2,
value_type  beta 
) const [virtual]

Implements AbstractLinAlgPack::MatrixOpSerial.

Definition at line 281 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

void AbstractLinAlgPack::MultiVectorMutableDense::Vp_StMtV ( DVectorSlice vs_lhs,
value_type  alpha,
BLAS_Cpp::Transp  trans_rhs1,
const SpVectorSlice sv_rhs2,
value_type  beta 
) const [virtual]

Reimplemented from AbstractLinAlgPack::MatrixOpSerial.

Definition at line 289 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

void AbstractLinAlgPack::MultiVectorMutableDense::apply_op ( EApplyBy  apply_by,
const RTOpPack::RTOp &  primary_op,
const size_t  num_multi_vecs,
const MultiVector **  multi_vecs,
const size_t  num_targ_multi_vecs,
MultiVectorMutable **  targ_multi_vecs,
RTOpPack::ReductTarget reduct_objs[],
const index_type  primary_first_ele,
const index_type  primary_sub_dim,
const index_type  primary_global_offset,
const index_type  secondary_first_ele,
const index_type  secondary_sub_dim 
) const [protected]

Definition at line 301 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.

void AbstractLinAlgPack::MultiVectorMutableDense::apply_op ( EApplyBy  apply_by,
const RTOpPack::RTOp &  primary_op,
const RTOpPack::RTOp &  secondary_op,
const size_t  num_multi_vecs,
const MultiVector **  multi_vecs,
const size_t  num_targ_multi_vecs,
MultiVectorMutable **  targ_multi_vecs,
RTOpPack::ReductTarget reduct_obj,
const index_type  primary_first_ele,
const index_type  primary_sub_dim,
const index_type  primary_global_offset,
const index_type  secondary_first_ele,
const index_type  secondary_sub_dim 
) const [protected]

Definition at line 317 of file AbstractLinAlgPack_MultiVectorMutableDense.cpp.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:31:48 2010 for AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects by  doxygen 1.4.7