#include <AbstractLinAlgPack_GenPermMatrixSlice.hpp>
Public types | |
| typedef GenPermMatrixSliceIteratorPack::EOrderedBy | EOrderedBy |
| | |
| typedef GenPermMatrixSliceIteratorPack::row_col_iterator< const index_type > | const_iterator |
| | |
| typedef ptrdiff_t | difference_type |
| | |
| enum | EIdentityOrZero |
| More... | |
Iterator Access. | |
| const_iterator | begin () const |
| Return a random access iterator for accessing which row and column that each nonzero 1.0 entry is located at. | |
| const_iterator | end () const |
Return the end of this->const_iterator_begin(). | |
Public Member Functions | |
| GenPermMatrixSlice () | |
| Construct to an uninitialzied, unsized matrix. | |
| GenPermMatrixSlice (index_type rows, index_type cols, EIdentityOrZero type) | |
| Construct to a matrix intialized to identity or zero (see initialize(,,,)). | |
| void | initialize (index_type rows, index_type cols, EIdentityOrZero type) |
| Initialize an identity or zero permutation. | |
| void | initialize (index_type rows, index_type cols, index_type nz, difference_type row_off, difference_type col_off, EOrderedBy ordered_by, const index_type row_i[], const index_type col_j[], bool test_setup=false) |
| Initialize. | |
| void | initialize_and_sort (index_type rows, index_type cols, index_type nz, difference_type row_off, difference_type col_off, EOrderedBy ordered_by, index_type row_i[], index_type col_j[], bool test_setup=false) |
| Initialize and sort. | |
| void | bind (const GenPermMatrixSlice &gpms) |
| Bind the view of another GenPermMatrixSlice object. | |
| index_type | rows () const |
| | |
| index_type | cols () const |
| | |
| index_type | nz () const |
| | |
| EOrderedBy | ordered_by () const |
| | |
| bool | is_identity () const |
| | |
| index_type | lookup_row_i (index_type col_j) const |
| Lookup the ith row index for the nonzero entry in the jth column if it exists. | |
| index_type | lookup_col_j (index_type row_i) const |
| Lookup the jth column index for the nonzero entry in the ith row if it exists. | |
| const GenPermMatrixSlice | create_submatrix (const Range1D &rng, EOrderedBy ordered_by) const |
| Create a submatrix by row, by column. | |
These are matrices who's rows or columns represent eta vectors (i.e. only one nonzero element with the value 1). These matrices can be rectangular and have one or more zero rows & columns. Therefore, these matrices can be used to represent gathering and scattering operations on other vectors and matrices.
This is only a view type. The client specifies the mapping arrays and then this class provides a clean encapsulation for the mapping. Objects of this type can also represent the identity matrix which is constructed with the initialize_identity(...) function.
The default copy constructor is allowd but the default assignment operator function is not.
Definition at line 52 of file AbstractLinAlgPack_GenPermMatrixSlice.hpp.
|
|
Definition at line 62 of file AbstractLinAlgPack_GenPermMatrixSlice.hpp. |
|
|
Definition at line 66 of file AbstractLinAlgPack_GenPermMatrixSlice.hpp. |
|
|
Definition at line 68 of file AbstractLinAlgPack_GenPermMatrixSlice.hpp. |
|
|
Definition at line 59 of file AbstractLinAlgPack_GenPermMatrixSlice.hpp. |
|
|
Construct to an uninitialzied, unsized matrix.
Definition at line 129 of file AbstractLinAlgPack_GenPermMatrixSlice.cpp. |
|
||||||||||||||||
|
Construct to a matrix intialized to identity or zero (see initialize(,,,)).
Definition at line 351 of file AbstractLinAlgPack_GenPermMatrixSlice.hpp. |
|
||||||||||||||||
|
Initialize an identity or zero permutation.
If Postconditions:
|
|
||||||||||||||||||||||||||||||||||||||||
|
Initialize.
It is required that if nz > 0 then: 1 <= row_i[k] + row_off <= rows, for k = 1...nz 1 <= col_j[k] + col_off <= cols, for k = 1...nz All of these preconditions will be checked if test_setup == true. After setup, the memory pointed to by row_i[] and col_j[] must not be altered since this object does not make an independent copy of this data. After construction the nonzero elements of this matrix are: M(row_i[k]+row_off,col_j[k]+col_off) = 1.0, for k = 1...nz. |
|
||||||||||||||||||||||||||||||||||||||||
|
Initialize and sort. This is the same as the initialize(...) function except that this function will actually sort the entries by row or by column or not at all.. ToDo: Finish documentation.
|
|
|
Bind the view of another GenPermMatrixSlice object. After construction these objects will share points to the same row_i[] and col_j[] arrays. Definition at line 238 of file AbstractLinAlgPack_GenPermMatrixSlice.cpp. |
|
|
Definition at line 357 of file AbstractLinAlgPack_GenPermMatrixSlice.hpp. |
|
|
Definition at line 363 of file AbstractLinAlgPack_GenPermMatrixSlice.hpp. |
|
|
Definition at line 369 of file AbstractLinAlgPack_GenPermMatrixSlice.hpp. |
|
|
Definition at line 381 of file AbstractLinAlgPack_GenPermMatrixSlice.hpp. |
|
|
Definition at line 375 of file AbstractLinAlgPack_GenPermMatrixSlice.hpp. |
|
|
Lookup the ith row index for the nonzero entry in the jth column if it exists.
This function will return 0 if the index is not found. If Preconditions:
Postconditions:
|
|
|
Lookup the jth column index for the nonzero entry in the ith row if it exists.
This function will return 0 if the index is not found. If Preconditions:
Postconditions:
|
|
|
Return a random access iterator for accessing which row and column that each nonzero 1.0 entry is located at. Preconditions:
If
for( GenPermMatrixSlice::const_iterator itr = gpms.begin(); itr != gpms.end(); ++itr )
{
std::cout << "row_i = " << itr->row_i();
std::cout << "col_j = " << itr->col_j();
}
You can also take a difference between iterators. Definition at line 285 of file AbstractLinAlgPack_GenPermMatrixSlice.cpp. |
|
|
Return the end of
Definition at line 291 of file AbstractLinAlgPack_GenPermMatrixSlice.cpp. |
|
||||||||||||
|
Create a submatrix by row, by column. If nz > 1 and this->ordered_by() == BY_ROW then ordered_by must also equal BY_ROW or if this->ordered_by() == BY_COL then ordered_by must also equal BY_COL or an std::logic_error exception will be thrown. If nz == 1, then obviously the nozeros are ordered by row and by column. This function should not be called if this->is_identity() == true. The argument rng must be explicitly sized (rng.full_range() != true) or the exception std::logic_error will be thrown. Also, the range argument must obey rng.lbound() >= 1, and rng.ubound() <= this->rows() if ordered_by == BY_ROW and rng.ubound() <= this->cols() if ordered_by == BY_COL. The argument ordered_by == UNORDERED is not allowed and this function can not be called if this->ordered_by() == UNORDERED. This operation just does not make any sense. The returned submatrix will contain all the entries for the designated rows if ordered_by == BY_ROW or columns if ordered_by == BY_CO. ToDo: Spell out the behavior of this operation more carefully. Definition at line 297 of file AbstractLinAlgPack_GenPermMatrixSlice.cpp. |
1.3.9.1