ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::lemon_interop::IndexMap< GR, S, Item > Class Template Reference

a ReadWriteMap of LEMON over a structure of ADS indexed by the ids of the items of a graph, ObservableArray or Fenwick among them More...

#include <ADS/interop/lemon/Maps.h>

Public types

using Key = Item
 the items
using Value
 the values, those that the structure reads

Public member functions

 IndexMap (const GR &g, S &s)
 the map of the items of \( g \) on \( s \); both must stay alive
Value operator[] (const Key &k) const
 the value of \( k \)
void set (const Key &k, const Value &v)
 the value of \( k \) set to \( v \), by set() of the structure
Value prefix (const Key &k) const
 the aggregate of the values of the ids up to that of \( k \), by prefix() of the structure (e.g., Fenwick)
S & structure (void) const
 the structure

Detailed description

template<class GR, class S, class Item = typename GR::Node>
class ADS::lemon_interop::IndexMap< GR, S, Item >

a ReadWriteMap of LEMON over a structure of ADS indexed by the ids of the items of a graph, ObservableArray or Fenwick among them

Member typedef documentation

◆ Key

template<class GR, class S, class Item = typename GR::Node>
using ADS::lemon_interop::IndexMap< GR, S, Item >::Key = Item

the items

◆ Value

template<class GR, class S, class Item = typename GR::Node>
using ADS::lemon_interop::IndexMap< GR, S, Item >::Value
Initial value:
std::remove_cvref_t< decltype( detail::readAt(
std::declval< const S & >() , std::size_t() ) ) >

the values, those that the structure reads

Constructor and destructor documentation

◆ IndexMap()

template<class GR, class S, class Item = typename GR::Node>
ADS::lemon_interop::IndexMap< GR, S, Item >::IndexMap ( const GR & g,
S & s )
inline

the map of the items of \( g \) on \( s \); both must stay alive

Precondition
\( s \) has room for maxId( Item() ) + 1 values

Member function documentation

◆ operator[]()

template<class GR, class S, class Item = typename GR::Node>
Value ADS::lemon_interop::IndexMap< GR, S, Item >::operator[] ( const Key & k) const
inlinenodiscard

the value of \( k \)

◆ prefix()

template<class GR, class S, class Item = typename GR::Node>
Value ADS::lemon_interop::IndexMap< GR, S, Item >::prefix ( const Key & k) const
inlinenodiscard

the aggregate of the values of the ids up to that of \( k \), by prefix() of the structure (e.g., Fenwick)

◆ set()

template<class GR, class S, class Item = typename GR::Node>
void ADS::lemon_interop::IndexMap< GR, S, Item >::set ( const Key & k,
const Value & v )
inline

the value of \( k \) set to \( v \), by set() of the structure

◆ structure()

template<class GR, class S, class Item = typename GR::Node>
S & ADS::lemon_interop::IndexMap< GR, S, Item >::structure ( void ) const
inlinenodiscard

the structure


The documentation for this class was generated from the following file: