42 #ifndef GEN_PERM_MATRIX_SLICE_H
43 #define GEN_PERM_MATRIX_SLICE_H
45 #include "AbstractLinAlgPack_GenPermMatrixSliceIterator.hpp"
47 namespace AbstractLinAlgPack {
75 typedef GenPermMatrixSliceIteratorPack::EOrderedBy
EOrderedBy;
158 ,
const index_type row_i[]
159 ,
const index_type col_j[]
160 ,
bool test_setup =
false
197 ,
bool test_setup =
false
208 index_type
rows()
const;
210 index_type
cols()
const;
212 index_type
nz()
const;
319 EOrderedBy ordered_by_;
320 const index_type *row_i_;
321 const index_type *col_j_;
340 static void validate_input_data(
347 ,
const index_type row_i[]
348 ,
const index_type col_j[]
349 ,std::ostringstream &omsg
353 void validate_not_identity()
const;
390 return nz_ > 0 && row_i_ == NULL;
401 #endif // GEN_PERM_MATRIX_SLICE_H
GenPermMatrixSlice()
Construct to an uninitialzied, unsized matrix.
GenPermMatrixSliceIteratorPack::EOrderedBy EOrderedBy
void initialize(index_type rows, index_type cols, EIdentityOrZero type)
Initialize an identity or zero permutation.
size_type rows(size_type rows, size_type cols, BLAS_Cpp::Transp _trans)
const_iterator end() const
Return the end of this->const_iterator_begin().
void bind(const GenPermMatrixSlice &gpms)
Bind the view of another GenPermMatrixSlice object.
This is a full random access iterator for accessing row and colunmn indices.
const GenPermMatrixSlice create_submatrix(const Range1D &rng, EOrderedBy ordered_by) const
Create a submatrix by row, by column.
const_iterator begin() const
Return a random access iterator for accessing which row and column that each nonzero 1...
ptrdiff_t difference_type
size_type cols(size_type rows, size_type cols, BLAS_Cpp::Transp _trans)
EOrderedBy ordered_by() 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.
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.
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.
Concrete matrix type to represent general permutation (mapping) matrices.
GenPermMatrixSliceIteratorPack::row_col_iterator< const index_type > const_iterator