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.

Public Types

typedef Teuchos::RCP
< VectorMutable
vec_mut_ptr_t
 
typedef Teuchos::RCP
< MultiVectorMutable
multi_vec_mut_ptr_t
 

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
 

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

Definition at line 80 of file AbstractLinAlgPack_MultiVectorMutable.hpp.

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:

  • [this->access_by() & COL_ACCESS] return.get() != NULL
  • [return.get() != NULL] space_cols().is_compatible(return->space()) == true

ToDo: Finish documentation!

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

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

Get a mutable row vector.

Postconditions:

  • [this->access_by() & ROW_ACCESS] return.get() != NULL
  • [return.get() != NULL] space_rows().is_compatible(return->space()) == true

ToDo: Finish documentation!

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

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

Get a mutable diagonal vector.

Postconditions:

  • [this->access_by() & DIAG_ACCESS] return.get() != NULL

ToDo: Finish documentation!

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

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, AbstractLinAlgPack::MultiVectorMutableDense, and AbstractLinAlgPack::MultiVectorMutableThyra.

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]
void AbstractLinAlgPack::MultiVectorMutable::zero_out (  )  [virtual]
void AbstractLinAlgPack::MultiVectorMutable::Mt_S ( value_type  alpha  )  [virtual]
MatrixOp & AbstractLinAlgPack::MultiVectorMutable::operator= ( const MatrixOp mwo_rhs  )  [virtual]
bool AbstractLinAlgPack::MultiVectorMutable::Mp_StM ( MatrixOp mwo_lhs,
value_type  alpha,
BLAS_Cpp::Transp  trans_rhs 
) const [virtual]
bool AbstractLinAlgPack::MultiVectorMutable::Mp_StM ( value_type  alpha,
const MatrixOp M_rhs,
BLAS_Cpp::Transp  trans_rhs 
) [virtual]
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]
MultiVectorMutable::vec_ptr_t AbstractLinAlgPack::MultiVectorMutable::row ( index_type  i  )  const [virtual]
MultiVectorMutable::vec_ptr_t AbstractLinAlgPack::MultiVectorMutable::diag ( int  k  )  const [virtual]
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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:17:28 2011 for MOOCHO (Single Doxygen Collection) by  doxygen 1.6.3