AbstractLinAlgPack::MultiVectorMutable Class Reference

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

#include <AbstractLinAlgPack_MultiVectorMutable.hpp>

Inheritance diagram for AbstractLinAlgPack::MultiVectorMutable:

[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::RefCountPtr<
VectorMutable
vec_mut_ptr_t
 
typedef Teuchos::RefCountPtr<
MultiVectorMutable
multi_vec_mut_ptr_t
 

Public Member Functions

virtual vec_ptr_t col (index_type j) const =0
 
virtual vec_ptr_t row (index_type i) const =0
 
virtual vec_ptr_t diag (int k) const =0
 

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::RefCountPtr<VectorMutable> AbstractLinAlgPack::MultiVectorMutable::vec_mut_ptr_t
 

Definition at line 80 of file AbstractLinAlgPack_MultiVectorMutable.hpp.

typedef Teuchos::RefCountPtr<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 72 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, and AbstractLinAlgPack::MultiVectorMutableDense.

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

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, 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 85 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 131 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 95 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 102 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 116 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 136 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 144 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

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

Reimplemented from AbstractLinAlgPack::MultiVector.

Definition at line 153 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

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

Implements AbstractLinAlgPack::MultiVector.

Definition at line 158 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

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

Implements AbstractLinAlgPack::MultiVector.

Definition at line 163 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

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

Implements AbstractLinAlgPack::MultiVector.

Definition at line 168 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 174 of file AbstractLinAlgPack_MultiVectorMutable.cpp.

virtual vec_ptr_t AbstractLinAlgPack::MultiVector::col index_type  j  )  const
 

virtual vec_ptr_t AbstractLinAlgPack::MultiVector::row index_type  i  )  const
 

virtual vec_ptr_t AbstractLinAlgPack::MultiVector::diag int  k  )  const
 


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:33:54 2008 for AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects by doxygen 1.3.9.1