|
AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects Version of the Day
|
Aggregation of a COO matrix and a partitioned view of it. More...
#include <AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp>
Public Member Functions | |
| size_type | rows () const |
| Calls coom_view().rows() if the partitioned view has been initialize and coom().rows() if not. | |
| size_type | cols () const |
| Calls coom_view().cols() if the partitioned view has been initialize and coom().cols() if not. | |
| COOMatrixWithPartitionedView & | operator= (const COOMatrixWithPartitionedView &m) |
| Assignment operator. | |
| COOMatrixWithPartitionedView & | operator= (const COOMatrix &m) |
| Allow assignment to a COOMatrix. | |
| const COOMatrix & | coom () const |
| Return a const referece to the COOMatrix. | |
| const partitioned_view_type & | coom_view () const |
| Return a const referece to the COOMatrixPartitionedView object. | |
Public Types | |
| typedef COOMatrixPartitionedView < indice_type, value_type > | partitioned_view_type |
| | |
| typedef partitioned_view_type::partition_type | partition_type |
| | |
| typedef partitioned_view_type::EPartitionOrder | EPartitionOrder |
| | |
COOMatrix non-const encapsulated interface. | |
| void | resize (size_type rows, size_type cols, size_type nz) |
| Resize for a rows# by cols# sparse matrix with #nz# elements. | |
| value_type * | val () |
| Return pointer to raw storage array (length #nz()#) for the values of the non-zero elements. | |
| indice_type * | ivect () |
| Return pointer to raw storage array (length #nz()#) for the row indices of the non-zero elements. | |
| indice_type * | jvect () |
| Return pointer to raw storage array (length #nz()#) for the column indices of the non-zero elements. | |
| void | initialize (std::istream &istrm) |
| Initialize from an input stream. | |
Non-const COOMatrixPartitionedView interface | |
| void | create_view (const size_type row_perm[], const size_type col_perm[], const size_type num_row_part, const size_type row_part[], const size_type num_col_part, const size_type col_part[], const EPartitionOrder partition_order) |
| Crete a view to the COO matrix. | |
| partition_type | partition (size_type overall_p) |
| | |
| partition_type | partition (size_type row_p, size_type col_p) |
| | |
| partition_type | partition (Range1D rng_overall_p) |
| | |
Aggregation of a COO matrix and a partitioned view of it.
This class represents the aggregation of a COOMatrix and a COOMatrixParitionedView. This class is designed to help avoid mistakes that may happen when the underlying COO matrix is modified and the partitioned view becomes obsolete. Therefore, operations that may make the partitioned view obsolete are encapsulated to delete the partitioned view.
Therefore, non-const references to the underlying COOMatrix and COOMatrixPartitioned view are not provided. Analogs for the non-const member functions are provided and keep track of the book keeping for you. This is a very light weight class in terms of overhead. The only exception to this are the rows() and cols() member functions. They are included to allow for use with the MatrixWithOpConcreteEncap<M> class.
The const interfaces to these objects can be accessed using the coom() and coom_view() member functions.
Definition at line 53 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| typedef COOMatrixPartitionedView<indice_type,value_type> AbstractLinAlgPack::COOMatrixWithPartitionedView::partitioned_view_type |
Definition at line 61 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| typedef partitioned_view_type::partition_type AbstractLinAlgPack::COOMatrixWithPartitionedView::partition_type |
Definition at line 63 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| typedef partitioned_view_type::EPartitionOrder AbstractLinAlgPack::COOMatrixWithPartitionedView::EPartitionOrder |
Definition at line 65 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| size_type AbstractLinAlgPack::COOMatrixWithPartitionedView::rows | ( | ) | const [inline] |
Calls coom_view().rows() if the partitioned view has been initialize and coom().rows() if not.
Definition at line 70 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| size_type AbstractLinAlgPack::COOMatrixWithPartitionedView::cols | ( | ) | const [inline] |
Calls coom_view().cols() if the partitioned view has been initialize and coom().cols() if not.
Definition at line 75 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| COOMatrixWithPartitionedView& AbstractLinAlgPack::COOMatrixWithPartitionedView::operator= | ( | const COOMatrixWithPartitionedView & | m | ) | [inline] |
Assignment operator.
Definition at line 80 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| COOMatrixWithPartitionedView& AbstractLinAlgPack::COOMatrixWithPartitionedView::operator= | ( | const COOMatrix & | m | ) | [inline] |
Allow assignment to a COOMatrix.
After the assignment #this# will not have its partitioned view initialized.
Definition at line 90 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| void AbstractLinAlgPack::COOMatrixWithPartitionedView::resize | ( | size_type | rows, |
| size_type | cols, | ||
| size_type | nz | ||
| ) | [inline] |
Resize for a rows# by cols# sparse matrix with #nz# elements.
If there was a partitioned view set up then this will destory it.
Definition at line 107 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| value_type* AbstractLinAlgPack::COOMatrixWithPartitionedView::val | ( | ) | [inline] |
Return pointer to raw storage array (length #nz()#) for the values of the non-zero elements.
This operation will not result in a loss of the partitioned view.
Definition at line 116 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| indice_type* AbstractLinAlgPack::COOMatrixWithPartitionedView::ivect | ( | ) | [inline] |
Return pointer to raw storage array (length #nz()#) for the row indices of the non-zero elements.
This operation will result in a loss of the partitioned view.
Definition at line 123 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| indice_type* AbstractLinAlgPack::COOMatrixWithPartitionedView::jvect | ( | ) | [inline] |
Return pointer to raw storage array (length #nz()#) for the column indices of the non-zero elements.
This operation will result in a loss of the partitioned view.
Definition at line 131 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| void AbstractLinAlgPack::COOMatrixWithPartitionedView::initialize | ( | std::istream & | istrm | ) | [inline] |
Initialize from an input stream.
This operation will result in a loss of the partitioned view.
Definition at line 140 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| const COOMatrix& AbstractLinAlgPack::COOMatrixWithPartitionedView::coom | ( | ) | const [inline] |
Return a const referece to the COOMatrix.
Definition at line 148 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| void AbstractLinAlgPack::COOMatrixWithPartitionedView::create_view | ( | const size_type | row_perm[], |
| const size_type | col_perm[], | ||
| const size_type | num_row_part, | ||
| const size_type | row_part[], | ||
| const size_type | num_col_part, | ||
| const size_type | col_part[], | ||
| const EPartitionOrder | partition_order | ||
| ) | [inline] |
Crete a view to the COO matrix.
Calls create_view on the partitioned view object using the data from the COOMatrix object.
Definition at line 161 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| partition_type AbstractLinAlgPack::COOMatrixWithPartitionedView::partition | ( | size_type | overall_p | ) | [inline] |
Definition at line 176 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| partition_type AbstractLinAlgPack::COOMatrixWithPartitionedView::partition | ( | size_type | row_p, |
| size_type | col_p | ||
| ) | [inline] |
Definition at line 181 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| partition_type AbstractLinAlgPack::COOMatrixWithPartitionedView::partition | ( | Range1D | rng_overall_p | ) | [inline] |
Definition at line 186 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
| const partitioned_view_type& AbstractLinAlgPack::COOMatrixWithPartitionedView::coom_view | ( | ) | const [inline] |
Return a const referece to the COOMatrixPartitionedView object.
Definition at line 193 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.
1.7.4