Class sdm::MappedMatrix
template <typename TLig, typename TCol, typename TValue>
Class List > sdm > MappedMatrix
Mapped matrices are matrices that use map to store values. Can be view as a sparse matrix with templated indexes. More...
#include <mapped_matrix.hpp>
Inherits the following classes: sdm::RecursiveMap, sdm::MatrixInterface
Public Types
Type | Name |
---|---|
typedef typename RecursiveMap< TLig, MappedVector< TCol, TValue > >::type | type |
typedef typename RecursiveMap< TLig, MappedVector< TCol, TValue > >::value_list_type | value_list_type |
typedef typename RecursiveMap< TLig, MappedVector< TCol, TValue > >::value_type | value_type |
typedef MappedVector< TCol, TValue > | vector_type |
Public Functions
Type | Name |
---|---|
MappedMatrix () | |
MappedMatrix (TValue default_value) | |
MappedMatrix (std::vector< long > dim, TValue default_value) | |
MappedMatrix (const MappedMatrix & copy) | |
MappedMatrix (std::initializer_list< value_list_type > vals) | |
const MappedVector< TCol, TValue > & | at (const TLig & i) const |
TValue | at (const TLig & i, const TCol & j) const |
std::vector< long > | dim () const |
MappedMatrix | dot (const MappedMatrix &) const |
std::vector< std::tuple< TLig, TCol, TValue > > | getAllElement () |
TValue | getDefault () const |
std::vector< Pair< TLig, TCol > > | getIndexes () |
TValue | getValueAt (const TLig &, const TCol &) const |
void | setValueAt (const TLig &, const TCol &, const TValue &) |
void | setValuesAt (const TLig & lig, const MappedVector< TCol, TValue > & vector) |
std::string | str () const |
Protected Attributes
Type | Name |
---|---|
MappedVector< TCol, TValue > | default_value_ |
std::vector< long > | dim_ = = {} |
Detailed Description
Template parameters:
TLig
the type of index for the linesTCol
the type of index for the columsTValue
the type of value (default :double
)
Public Types Documentation
typedef type
using sdm::MappedMatrix< TLig, TCol, TValue >::type = typename RecursiveMap<TLig, MappedVector<TCol, TValue> >::type;
typedef value_list_type
using sdm::MappedMatrix< TLig, TCol, TValue >::value_list_type = typename RecursiveMap<TLig, MappedVector<TCol, TValue> >::value_list_type;
typedef value_type
using sdm::MappedMatrix< TLig, TCol, TValue >::value_type = typename RecursiveMap<TLig, MappedVector<TCol, TValue> >::value_type;
typedef vector_type
using sdm::MappedMatrix< TLig, TCol, TValue >::vector_type = MappedVector<TCol, TValue>;
Public Functions Documentation
function MappedMatrix [1/5]
sdm::MappedMatrix::MappedMatrix ()
function MappedMatrix [2/5]
sdm::MappedMatrix::MappedMatrix (
TValue default_value
)
function MappedMatrix [3/5]
sdm::MappedMatrix::MappedMatrix (
std::vector< long > dim,
TValue default_value
)
function MappedMatrix [4/5]
sdm::MappedMatrix::MappedMatrix (
const MappedMatrix & copy
)
function MappedMatrix [5/5]
sdm::MappedMatrix::MappedMatrix (
std::initializer_list< value_list_type > vals
)
function at [1/2]
const MappedVector < TCol, TValue > & sdm::MappedMatrix::at (
const TLig & i
) const
function at [2/2]
TValue sdm::MappedMatrix::at (
const TLig & i,
const TCol & j
) const
function dim
std::vector< long > sdm::MappedMatrix::dim () const
function dot
MappedMatrix sdm::MappedMatrix::dot (
const MappedMatrix &
) const
function getAllElement
std::vector< std::tuple< TLig, TCol, TValue > > sdm::MappedMatrix::getAllElement ()
function getDefault
TValue sdm::MappedMatrix::getDefault () const
function getIndexes
std::vector< Pair < TLig, TCol > > sdm::MappedMatrix::getIndexes ()
function getValueAt
TValue sdm::MappedMatrix::getValueAt (
const TLig &,
const TCol &
) const
function setValueAt
void sdm::MappedMatrix::setValueAt (
const TLig &,
const TCol &,
const TValue &
)
function setValuesAt
void sdm::MappedMatrix::setValuesAt (
const TLig & lig,
const MappedVector < TCol, TValue > & vector
)
function str
std::string sdm::MappedMatrix::str () const
Protected Attributes Documentation
variable default_value_
MappedVector<TCol, TValue> sdm::MappedMatrix< TLig, TCol, TValue >::default_value_;
variable dim_
std::vector<long> sdm::MappedMatrix< TLig, TCol, TValue >::dim_;
The documentation for this class was generated from the following file src/sdm/utils/linear_algebra/mapped_matrix.hpp