CMR
1.3.0
|
Matrix proxy for the transpose of a matrix. More...
#include <matrix.hpp>
Classes | |
class | NonzeroIterator |
Public Types | |
typedef M::Value | Value |
typedef M::Index | Index |
typedef M::Nonzero | Nonzero |
typedef detail::Range< NonzeroIterator< true > > | NonzeroRowRange |
typedef detail::Range< NonzeroIterator< false > > | NonzeroColumnRange |
Public Types inherited from tu::Matrix< M::Value > | |
typedef M::Value | Value |
typedef std::size_t | Index |
Type of entries. More... | |
Public Member Functions | |
TransposedMatrix (M &matrix) | |
Constructs from a matrix of type M . More... | |
TransposedMatrix (TransposedMatrix &&other) | |
Move constructor. More... | |
std::size_t | numRows () const |
Returns the number of rows. More... | |
std::size_t | numColumns () const |
Returns the number of columns. More... | |
bool | hasSortedRows () const |
Indicates if the row data is sorted by column. More... | |
bool | hasSortedColumns () const |
Indicates if the column data is sorted by row. More... | |
const Value & | get (Index row, Index column) const |
Returns entry at row , column . More... | |
std::size_t | numNonzeros () const |
Returns the number of nonzeros. More... | |
std::size_t | countRowNonzeros (Index row) const |
Returns the number of nonzeros in row . More... | |
std::size_t | countColumnNonzeros (Index column) const |
Returns the number of nonzeros in column . More... | |
NonzeroRowRange | iterateRowNonzeros (Index row) const |
Returns a range for iterating over the nonzeros of row . More... | |
NonzeroColumnRange | iterateColumnNonzeros (Index column) const |
Returns a range for iterating over the nonzeros of column . More... | |
void | ensureConsistency () const |
Checks for consistency, raising a std::runtime_error if inconsistent. More... | |
Protected Attributes | |
M & | _matrix |
Matrix proxy for the transpose of a matrix.
Matrix proxy for the transpose of a matrix. It references another matrix and does not maintain matrix data by itself.
typedef M::Index tu::TransposedMatrix< M >::Index |
typedef M::Nonzero tu::TransposedMatrix< M >::Nonzero |
typedef detail::Range<NonzeroIterator<false> > tu::TransposedMatrix< M >::NonzeroColumnRange |
typedef detail::Range<NonzeroIterator<true> > tu::TransposedMatrix< M >::NonzeroRowRange |
typedef M::Value tu::TransposedMatrix< M >::Value |
|
inline |
Constructs from a matrix of type M
.
|
inline |
Move constructor.
|
inline |
Returns the number of nonzeros in column
.
|
inline |
Returns the number of nonzeros in row
.
|
inline |
Checks for consistency, raising a std::runtime_error if inconsistent.
|
inline |
Returns entry at row
, column
.
Returns entry at row
, column
. If the row or column data is sorted (resp. not sorted) then the time is logarithmic (resp. linear) in the number of nonzeros of the row or column.
|
inline |
Indicates if the column data is sorted by row.
|
inline |
Indicates if the row data is sorted by column.
|
inline |
Returns a range for iterating over the nonzeros of column
.
|
inline |
Returns a range for iterating over the nonzeros of row
.
|
inline |
Returns the number of columns.
|
inline |
Returns the number of nonzeros.
|
inline |
Returns the number of rows.
|
protected |