AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
AbstractLinAlgPack::COOMatrixWithPartitionedView Class Reference

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. More...
 
size_type cols () const
 Calls coom_view().cols() if the partitioned view has been initialize and coom().cols() if not. More...
 
COOMatrixWithPartitionedViewoperator= (const COOMatrixWithPartitionedView &m)
 Assignment operator. More...
 
COOMatrixWithPartitionedViewoperator= (const COOMatrix &m)
 Allow assignment to a COOMatrix. More...
 
const COOMatrixcoom () const
 Return a const referece to the COOMatrix. More...
 
const partitioned_view_typecoom_view () const
 Return a const referece to the COOMatrixPartitionedView object. More...
 

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.

The default constructor and copy constructor are allowed.

void resize (size_type rows, size_type cols, size_type nz)
 Resize for a rows# by cols# sparse matrix with #nz# elements. More...
 
value_type * val ()
 Return pointer to raw storage array (length #nz()#) for the values of the non-zero elements. More...
 
indice_type * ivect ()
 Return pointer to raw storage array (length #nz()#) for the row indices of the non-zero elements. More...
 
indice_type * jvect ()
 Return pointer to raw storage array (length #nz()#) for the column indices of the non-zero elements. More...
 
void initialize (std::istream &istrm)
 Initialize from an input stream. More...
 

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. More...
 
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)
 

Detailed Description

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 66 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.

Member Typedef Documentation

typedef partitioned_view_type::EPartitionOrder AbstractLinAlgPack::COOMatrixWithPartitionedView::EPartitionOrder

Member Function Documentation

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 83 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 88 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.

COOMatrixWithPartitionedView& AbstractLinAlgPack::COOMatrixWithPartitionedView::operator= ( const COOMatrixWithPartitionedView m)
inline

Assignment operator.

Definition at line 93 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 103 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 120 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 129 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 136 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 144 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 153 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.

const COOMatrix& AbstractLinAlgPack::COOMatrixWithPartitionedView::coom ( ) const
inline

Return a const referece to the COOMatrix.

Definition at line 161 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 174 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.

partition_type AbstractLinAlgPack::COOMatrixWithPartitionedView::partition ( size_type  overall_p)
inline
partition_type AbstractLinAlgPack::COOMatrixWithPartitionedView::partition ( size_type  row_p,
size_type  col_p 
)
inline
partition_type AbstractLinAlgPack::COOMatrixWithPartitionedView::partition ( Range1D  rng_overall_p)
inline
const partitioned_view_type& AbstractLinAlgPack::COOMatrixWithPartitionedView::coom_view ( ) const
inline

Return a const referece to the COOMatrixPartitionedView object.

Definition at line 206 of file AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp.


The documentation for this class was generated from the following file: