CMR
1.3.0
|
Dense matrix with entries of type V
.
More...
#include <matrix.hpp>
Classes | |
class | NonzeroIterator |
Public Types | |
typedef Matrix< V >::Value | Value |
typedef Matrix< V >::Index | Index |
typedef Matrix< V >::Nonzero | Nonzero |
typedef detail::Range< NonzeroIterator< true > > | NonzeroRowRange |
typedef detail::Range< NonzeroIterator< false > > | NonzeroColumnRange |
Public Types inherited from tu::Matrix< V > | |
typedef V | Value |
typedef std::size_t | Index |
Type of entries. More... | |
Public Member Functions | |
DenseMatrix () | |
Default constructor for 0x0 matrix. More... | |
DenseMatrix (DenseMatrix< V > &&other) | |
Move constructor that steals the data from other . More... | |
template<typename V2 > | |
DenseMatrix (const DenseMatrix< V2 > &other) | |
Copy constructor. More... | |
DenseMatrix< V > & | operator= (DenseMatrix< V > &&other) |
Move assignment operator that steals the data from other . More... | |
template<typename V2 > | |
DenseMatrix< V > & | operator= (const DenseMatrix< V2 > &other) |
Assignment operator. More... | |
~DenseMatrix () | |
Destructor. More... | |
DenseMatrix (Index numRows, Index numColumns) | |
Constructs zero matrix of given size. More... | |
Index | numRows () const |
Returns the number of rows. More... | |
Index | numColumns () const |
Returns the number of columns. More... | |
const Value & | get (Index row, Index column) const |
Returns entry at row , column . More... | |
template<typename V2 > | |
void | set (Index row, Index column, const V2 &value) |
Sets entry at row , column to copy of value . 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 | |
Value * | _data |
Index | _numRows |
Matrix entries with row-major ordering. More... | |
Index | _numColumns |
Number of rows. More... | |
Dense matrix with entries of type V
.
typedef Matrix<V>::Index tu::DenseMatrix< V >::Index |
typedef Matrix<V>::Nonzero tu::DenseMatrix< V >::Nonzero |
typedef detail::Range<NonzeroIterator<false> > tu::DenseMatrix< V >::NonzeroColumnRange |
typedef detail::Range<NonzeroIterator<true> > tu::DenseMatrix< V >::NonzeroRowRange |
typedef Matrix<V>::Value tu::DenseMatrix< V >::Value |
|
inline |
Default constructor for 0x0 matrix.
|
inline |
Move constructor that steals the data from other
.
|
inline |
Copy constructor.
|
inline |
Destructor.
|
inline |
Constructs zero matrix of given size.
|
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
.
|
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 rows.
|
inline |
Assignment operator.
|
inline |
Move assignment operator that steals the data from other
.
|
inline |
Sets entry at row
, column
to copy of value
.
|
protected |
|
protected |
Number of rows.
|
protected |
Matrix entries with row-major ordering.