|
AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects
Version of the Day
|
Interface for a collection of mutable vectors (multi-vector, matrix). More...
#include <AbstractLinAlgPack_MultiVectorMutable.hpp>

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) |
| | |
| MatrixOp & | operator= (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 |
| | |
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 82 of file AbstractLinAlgPack_MultiVectorMutable.hpp.
Definition at line 93 of file AbstractLinAlgPack_MultiVectorMutable.hpp.
| typedef Teuchos::RCP<MultiVectorMutable> AbstractLinAlgPack::MultiVectorMutable::multi_vec_mut_ptr_t |
Definition at line 95 of file AbstractLinAlgPack_MultiVectorMutable.hpp.
| 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 89 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::MultiVectorMutableDense, and AbstractLinAlgPack::MultiVectorMutableCols.
| 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::MultiVectorMutableDense, and AbstractLinAlgPack::MultiVectorMutableCols.
| 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::MultiVectorMutableDense, and AbstractLinAlgPack::MultiVectorMutableCols.
| 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::MultiVectorMutableDense, and AbstractLinAlgPack::MultiVectorMutableCols.
Definition at line 102 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 211 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 148 of file AbstractLinAlgPack_MultiVectorMutable.cpp.
| void AbstractLinAlgPack::MultiVectorMutable::zero_out | ( | ) | [virtual] |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Reimplemented in AbstractLinAlgPack::MultiVectorMutableDense, and AbstractLinAlgPack::MultiVectorMutableCols.
Definition at line 112 of file AbstractLinAlgPack_MultiVectorMutable.cpp.
| void AbstractLinAlgPack::MultiVectorMutable::Mt_S | ( | value_type | alpha | ) | [virtual] |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Reimplemented in AbstractLinAlgPack::MultiVectorMutableDense, and AbstractLinAlgPack::MultiVectorMutableCols.
Definition at line 119 of file AbstractLinAlgPack_MultiVectorMutable.cpp.
Reimplemented from AbstractLinAlgPack::MatrixOp.
Reimplemented in AbstractLinAlgPack::MultiVectorMutableDense, and AbstractLinAlgPack::MultiVectorMutableCols.
Definition at line 133 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 153 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 161 of file AbstractLinAlgPack_MultiVectorMutable.cpp.
| MultiVector::multi_vec_ptr_t AbstractLinAlgPack::MultiVectorMutable::mv_clone | ( | ) | const [virtual] |
Reimplemented from AbstractLinAlgPack::MultiVector.
Definition at line 170 of file AbstractLinAlgPack_MultiVectorMutable.cpp.
| MultiVectorMutable::vec_ptr_t AbstractLinAlgPack::MultiVectorMutable::col | ( | index_type | j | ) | const [virtual] |
Implements AbstractLinAlgPack::MultiVector.
Definition at line 175 of file AbstractLinAlgPack_MultiVectorMutable.cpp.
| MultiVectorMutable::vec_ptr_t AbstractLinAlgPack::MultiVectorMutable::row | ( | index_type | i | ) | const [virtual] |
Implements AbstractLinAlgPack::MultiVector.
Definition at line 180 of file AbstractLinAlgPack_MultiVectorMutable.cpp.
| MultiVectorMutable::vec_ptr_t AbstractLinAlgPack::MultiVectorMutable::diag | ( | int | k | ) | const [virtual] |
Implements AbstractLinAlgPack::MultiVector.
Definition at line 185 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 191 of file AbstractLinAlgPack_MultiVectorMutable.cpp.
1.7.6.1