AbstractLinAlgPack::MultiVectorMutable Class Reference

Interface for a collection of mutable vectors (multi-vector, matrix). More...

#include <AbstractLinAlgPack_MultiVectorMutable.hpp>

Inheritance diagram for AbstractLinAlgPack::MultiVectorMutable:

Inheritance graph
[legend]
List of all members.

Clone

virtual multi_vec_mut_ptr_t mv_clone ()
 Clone the non-const multi-vector object.

Provide mutable row, column and/or diagonal access

virtual vec_mut_ptr_t col (index_type j)=0
 Get a mutable column vector.
virtual vec_mut_ptr_t row (index_type i)=0
 Get a mutable row vector.
virtual vec_mut_ptr_t diag (int k)=0
 Get a mutable diagonal vector.

Sub-view methods

virtual multi_vec_mut_ptr_t mv_sub_view (const Range1D &row_rng, const Range1D &col_rng)
 Returns a mutable sub-view of the multi vector.
multi_vec_mut_ptr_t mv_sub_view (const index_type &rl, const index_type &ru, const index_type &cl, const index_type &cu)
 Inlined implementation calls this->mv_sub_view(Range1D(rl,ru),Range1D(cl,cu)).

Overridden from MatrixOp

mat_mut_ptr_t clone ()
 
void zero_out ()
 
void Mt_S (value_type alpha)
 
MatrixOpoperator= (const MatrixOp &mwo_rhs)
 
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)
 

Overridden from MultiVector

multi_vec_ptr_t mv_clone () const
 
vec_ptr_t col (index_type j) const
 
vec_ptr_t row (index_type i) const
 
vec_ptr_t diag (int k) const
 
multi_vec_ptr_t mv_sub_view (const Range1D &row_rng, const Range1D &col_rng) const
 

Public Types

typedef Teuchos::RCP< VectorMutablevec_mut_ptr_t
 
typedef Teuchos::RCP< MultiVectorMutablemulti_vec_mut_ptr_t
 

Detailed Description

Interface for a collection of mutable vectors (multi-vector, matrix).

This interface extends the MutiVector interface an allows mutable access to the constituent vectors.

These vectors allow the modification of the matrix row by row, column by column, and/or diagonal by diagonal. Each of the views is transient and should be used and discarded quickly.

Note that the underlying matrix is only guaranteed to be modified after the smart reference counted pointer returned from these methods is destoryed. For example, consider the following code:

 void f( MultiVectorMutable* M, index_type i )
 {
  MultiVectorMutable::vec_mut_ptr_t
      row_i =M->row(i);
  *row_i = 0.0;
  // The underlying matrix may not be modified at this point.
  row_i = NULL;
  // Now the underlying matrix is guaranteed to be modified and
  // we can assume this in the following code.
  ...
 }
Default implementations of the const access methods row() col() and diag() from MultiVector call the non-const methods defined here and cast the pointers.

Many of the default implementations of the linear algebra operations in MatrixOp and the other matrix interfaces rely on the left hand side matrix objects supporting the MultiVectorMutable interface.

Definition at line 69 of file AbstractLinAlgPack_MultiVectorMutable.hpp.


Member Typedef Documentation

typedef Teuchos::RCP<VectorMutable> AbstractLinAlgPack::MultiVectorMutable::vec_mut_ptr_t

Definition at line 80 of file AbstractLinAlgPack_MultiVectorMutable.hpp.

typedef Teuchos::RCP<MultiVectorMutable> AbstractLinAlgPack::MultiVectorMutable::multi_vec_mut_ptr_t

Definition at line 82 of file AbstractLinAlgPack_MultiVectorMutable.hpp.


Member Function Documentation

MultiVectorMutable::multi_vec_mut_ptr_t AbstractLinAlgPack::MultiVectorMutable::mv_clone (  )  [virtual]

Clone the non-const multi-vector object.

The default implementation creates a new multi-vector and then copies the values.

Definition at line 76 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

virtual vec_mut_ptr_t AbstractLinAlgPack::MultiVectorMutable::col ( index_type  j  )  [pure virtual]

Get a mutable column vector.

Postconditions:

ToDo: Finish documentation!

Implemented in AbstractLinAlgPack::MultiVectorMutableCols, and AbstractLinAlgPack::MultiVectorMutableDense.

virtual vec_mut_ptr_t AbstractLinAlgPack::MultiVectorMutable::row ( index_type  i  )  [pure virtual]

Get a mutable row vector.

Postconditions:

ToDo: Finish documentation!

Implemented in AbstractLinAlgPack::MultiVectorMutableCols, and AbstractLinAlgPack::MultiVectorMutableDense.

virtual vec_mut_ptr_t AbstractLinAlgPack::MultiVectorMutable::diag ( int  k  )  [pure virtual]

Get a mutable diagonal vector.

Postconditions:

ToDo: Finish documentation!

Implemented in AbstractLinAlgPack::MultiVectorMutableCols, and AbstractLinAlgPack::MultiVectorMutableDense.

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

Returns a mutable sub-view of the multi vector.

ToDo: Finish documentation!

The default implementation returns a MultiVectorMutableSubView object for any valid arbitary sub-view.

Reimplemented in AbstractLinAlgPack::MultiVectorMutableCols, and AbstractLinAlgPack::MultiVectorMutableDense.

Definition at line 89 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

MultiVectorMutable::multi_vec_mut_ptr_t AbstractLinAlgPack::MultiVectorMutable::mv_sub_view ( const index_type rl,
const index_type ru,
const index_type cl,
const index_type cu 
) [inline]

Inlined implementation calls this->mv_sub_view(Range1D(rl,ru),Range1D(cl,cu)).

Definition at line 198 of file AbstractLinAlgPack_MultiVectorMutable.hpp.

MatrixOp::mat_mut_ptr_t AbstractLinAlgPack::MultiVectorMutable::clone (  )  [virtual]

Reimplemented from AbstractLinAlgPack::MatrixOp.

Reimplemented in AbstractLinAlgPack::MultiVectorMutableCols.

Definition at line 135 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

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

Reimplemented from AbstractLinAlgPack::MatrixOp.

Reimplemented in AbstractLinAlgPack::MultiVectorMutableCols, and AbstractLinAlgPack::MultiVectorMutableDense.

Definition at line 99 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

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

Reimplemented from AbstractLinAlgPack::MatrixOp.

Reimplemented in AbstractLinAlgPack::MultiVectorMutableCols, and AbstractLinAlgPack::MultiVectorMutableDense.

Definition at line 106 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

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

Reimplemented from AbstractLinAlgPack::MatrixOp.

Reimplemented in AbstractLinAlgPack::MultiVectorMutableCols, and AbstractLinAlgPack::MultiVectorMutableDense.

Definition at line 120 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

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

Reimplemented from AbstractLinAlgPack::MatrixOp.

Reimplemented in AbstractLinAlgPack::MultiVectorMutableDense.

Definition at line 140 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

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

Reimplemented from AbstractLinAlgPack::MatrixOp.

Reimplemented in AbstractLinAlgPack::MultiVectorMutableDense.

Definition at line 148 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

MultiVector::multi_vec_ptr_t AbstractLinAlgPack::MultiVectorMutable::mv_clone (  )  const [virtual]

Reimplemented from AbstractLinAlgPack::MultiVector.

Definition at line 157 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

MultiVectorMutable::vec_ptr_t AbstractLinAlgPack::MultiVectorMutable::col ( index_type  j  )  const [virtual]

Implements AbstractLinAlgPack::MultiVector.

Definition at line 162 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

MultiVectorMutable::vec_ptr_t AbstractLinAlgPack::MultiVectorMutable::row ( index_type  i  )  const [virtual]

Implements AbstractLinAlgPack::MultiVector.

Definition at line 167 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

MultiVectorMutable::vec_ptr_t AbstractLinAlgPack::MultiVectorMutable::diag ( int  k  )  const [virtual]

Implements AbstractLinAlgPack::MultiVector.

Definition at line 172 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

MultiVectorMutable::multi_vec_ptr_t AbstractLinAlgPack::MultiVectorMutable::mv_sub_view ( const Range1D row_rng,
const Range1D col_rng 
) const [virtual]

Reimplemented from AbstractLinAlgPack::MultiVector.

Definition at line 178 of file AbstractLinAlgPack_MultiVectorMutable.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jul 13 09:29:02 2010 for AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects by  doxygen 1.4.7