Matrix entry type, for use in sparse matrix. The matrix entry base class is specialized as Row and Column, for the two sparse matrix representations. The class thus represents a row or column vector with mostly zero entries. Its operator[] is overloaded to provide access as if it is a dense vector. Access using operator[] is O(n) in time, with n the number of nonzero entries.
More...
#include <data_objects.hpp>
|
|
using | Index = int |
| |
|
using | SizeType = std::size_t |
| |
|
using | iterator_category = std::forward_iterator_tag |
| |
|
using | value_type = T |
| |
|
using | difference_type = int |
| |
|
using | pointer = value_type * |
| |
|
using | reference = value_type & |
| |
|
|
| MatrixEntry (MatrixEntry< T > &&)=default |
| |
|
| MatrixEntry (const MatrixEntry< T > &)=delete |
| |
|
MatrixEntry< T > & | operator= (const MatrixEntry< T > &)=delete |
| |
|
MatrixEntry< T > & | operator= (MatrixEntry< T > &&)=default |
| |
|
| MatrixEntry (const std::size_t size) |
| |
|
| MatrixEntry (const std::vector< T > &values, const std::vector< Index > &indices) |
| |
| T | operator[] (const SizeType index) const |
| | Indexing operator; can be used identically to a dense vector. Will perform bounds checking ifndef NDEBUG. More...
|
| |
|
T | lower_bound () const |
| | Returns the smallest entry of this matrix element.
|
| |
|
T | upper_bound () const |
| | Returns the largest entry of this matrix element.
|
| |
|
std::vector< T >::size_type | num_nonzero () const |
| | Return the number of nonzero entries in the matrix entry.
|
| |
|
const std::vector< T > & | values () const |
| | Get a const reference to the underlying value array.
|
| |
|
std::vector< T > & | values () |
| | Get a reference to the underlying value array.
|
| |
|
const std::vector< Index > & | nonzero_indices () const |
| | Get a const reference to the underlying nonzero indices.
|
| |
|
std::vector< Index > & | nonzero_indices () |
| | Get a reference to the underlying nonzero indices.
|
| |
| iterator | begin () |
| |
|
const_iterator | begin () const |
| | Obtain a const iterator to the begin of the underlying value array.
|
| |
|
iterator | end () |
| | Obtain an iterator to the end of the underlying value array.
|
| |
|
const_iterator | end () const |
| | Obtain a const iterator to the end of the underlying value array.
|
| |
template<typename T>
class lpint::MatrixEntry< T >
Matrix entry type, for use in sparse matrix. The matrix entry base class is specialized as Row and Column, for the two sparse matrix representations. The class thus represents a row or column vector with mostly zero entries. Its operator[] is overloaded to provide access as if it is a dense vector. Access using operator[] is O(n) in time, with n the number of nonzero entries.
Obtain an iterator to the begin of the ests/CMakeFiles/unit_tests.dir/all] Error 2
Indexing operator; can be used identically to a dense vector. Will perform bounds checking ifndef NDEBUG.
- Parameters
-
| index | Index of element to retrieve. |
- Returns
- T Element at index.
The documentation for this class was generated from the following file: