ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::lemon_interop::LemonMirror< G > Class Template Reference

a lemon::ListDigraph and its weights kept in step with a graph of ADS, as an observer of its ObservedGraph More...

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

Classes

struct  Kinds
 what the events since the last clearKinds() changed More...

Public types

using Weight = typename G::Weight
 the type of the weights
using LG = ::lemon::ListDigraph
 the digraph of LEMON
using WeightMap = LG::ArcMap< Weight >
 its weights

Public member functions

 LemonMirror (const G &g)
 the mirror of \( g \) as it is now, in \( O( n + m ) \) expected time
 LemonMirror (const LemonMirror &)=delete
 not copied: the maps of LEMON are bound to their digraph
LemonMirror & operator= (const LemonMirror &)=delete
 not assigned
void on (const NodeInserted &e)
 the node \( u \) inserted
void on (const NodeDeleted &e) noexcept
 the node \( u \) deleted, after its edges
void on (const EdgeInserted< Weight > &e)
 the edge inserted, with its weight
void on (const EdgeDeleted< Weight > &e) noexcept
 the edge deleted
void on (const WeightChanged< Weight > &e)
 the weight of an edge changed
const LG & digraph (void) const
 the digraph of LEMON
const WeightMap & weights (void) const
 the weights of its arcs
LG::Node node (int u) const
 the node of LEMON of the name \( u \) of ADS, INVALID if none
LG::Arc arc (int u, int v) const
 the arc of LEMON of the arc \( ( u , v ) \) of ADS, INVALID if none
const Kinds & kinds (void) const
 the kinds of the events since the last clearKinds()
bool stale (void) const
 whether something changed since the last clearKinds()
void clearKinds (void)
 the kinds forgotten, e.g., after an algorithm of LEMON ran again

Detailed description

template<Graph G>
class ADS::lemon_interop::LemonMirror< G >

a lemon::ListDigraph and its weights kept in step with a graph of ADS, as an observer of its ObservedGraph

Member typedef documentation

◆ LG

template<Graph G>
using ADS::lemon_interop::LemonMirror< G >::LG = ::lemon::ListDigraph

the digraph of LEMON

◆ Weight

template<Graph G>
using ADS::lemon_interop::LemonMirror< G >::Weight = typename G::Weight

the type of the weights

◆ WeightMap

template<Graph G>
using ADS::lemon_interop::LemonMirror< G >::WeightMap = LG::ArcMap< Weight >

its weights

Constructor and destructor documentation

◆ LemonMirror() [1/2]

template<Graph G>
ADS::lemon_interop::LemonMirror< G >::LemonMirror ( const G & g)
explicit

the mirror of \( g \) as it is now, in \( O( n + m ) \) expected time

◆ LemonMirror() [2/2]

template<Graph G>
ADS::lemon_interop::LemonMirror< G >::LemonMirror ( const LemonMirror< G > & )
delete

not copied: the maps of LEMON are bound to their digraph

Member function documentation

◆ arc()

template<Graph G>
LG::Arc ADS::lemon_interop::LemonMirror< G >::arc ( int u,
int v ) const
inlinenodiscard

the arc of LEMON of the arc \( ( u , v ) \) of ADS, INVALID if none

◆ clearKinds()

template<Graph G>
void ADS::lemon_interop::LemonMirror< G >::clearKinds ( void )
inline

the kinds forgotten, e.g., after an algorithm of LEMON ran again

◆ digraph()

template<Graph G>
const LG & ADS::lemon_interop::LemonMirror< G >::digraph ( void ) const
inlinenodiscard

the digraph of LEMON

◆ kinds()

template<Graph G>
const Kinds & ADS::lemon_interop::LemonMirror< G >::kinds ( void ) const
inlinenodiscard

the kinds of the events since the last clearKinds()

◆ node()

template<Graph G>
LG::Node ADS::lemon_interop::LemonMirror< G >::node ( int u) const
inlinenodiscard

the node of LEMON of the name \( u \) of ADS, INVALID if none

◆ on() [1/5]

template<Graph G>
void ADS::lemon_interop::LemonMirror< G >::on ( const EdgeDeleted< Weight > & e)
noexcept

the edge deleted

◆ on() [2/5]

template<Graph G>
void ADS::lemon_interop::LemonMirror< G >::on ( const EdgeInserted< Weight > & e)

the edge inserted, with its weight

◆ on() [3/5]

template<Graph G>
void ADS::lemon_interop::LemonMirror< G >::on ( const NodeDeleted & e)
noexcept

the node \( u \) deleted, after its edges

◆ on() [4/5]

template<Graph G>
void ADS::lemon_interop::LemonMirror< G >::on ( const NodeInserted & e)

the node \( u \) inserted

◆ on() [5/5]

template<Graph G>
void ADS::lemon_interop::LemonMirror< G >::on ( const WeightChanged< Weight > & e)

the weight of an edge changed

◆ operator=()

template<Graph G>
LemonMirror & ADS::lemon_interop::LemonMirror< G >::operator= ( const LemonMirror< G > & )
delete

not assigned

◆ stale()

template<Graph G>
bool ADS::lemon_interop::LemonMirror< G >::stale ( void ) const
inlinenodiscard

whether something changed since the last clearKinds()

◆ weights()

template<Graph G>
const WeightMap & ADS::lemon_interop::LemonMirror< G >::weights ( void ) const
inlinenodiscard

the weights of its arcs


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