Provide mapping from MultiIndex of source basis to MultiIndex of target basis. More...
#include <BasisMapping.hpp>
Inherits ObserverSequenceImpl< Event, Tags >.
Public Types | |
| using | SourceBasisType = SourceBasis |
| using | TargetBasisType = TargetBasis |
Public Member Functions | |
| BasisMapping (std::shared_ptr< SourceBasis > const &source, std::shared_ptr< TargetBasis > const &target) | |
| BasisMapping (SourceBasis &source, TargetBasis &target) | |
| TargetBasis::MultiIndex const & | operator() (typename SourceBasis::MultiIndex const &mi) const |
| Map a source index to a target index. | |
| TargetBasis::MultiIndex const & | operator() (std::size_t idx) const |
| Map a flat source into to a target index. | |
| TargetBasis const & | sizeInfo () const |
| Return the target basis as a size info object. | |
| std::shared_ptr< SourceBasis > const & | source () const |
| Return the source basis. | |
| std::shared_ptr< TargetBasis > const & | target () const |
| Return the target basis. | |
Protected Member Functions | |
| void | updateImpl (event::adapt e, index_t< 0 > i) override |
| void | updateImpl (event::adapt e, index_t< 1 > i) override |
Provide mapping from MultiIndex of source basis to MultiIndex of target basis.
Create an index map that transfers the MultiIndex of one basis to another basis. The type of the mapping can be provided. This allows to use a vector if the source basis uses flat indices.
|
inline |
Map a source index to a target index.
The passed argument mi may be of type SourceBasis::MultiIndex or, if it is a flat index, of type std::size_t.