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

a graph of NetworKit kept in step with a graph of ADS, as an observer of its ObservedGraph, which tells each change to the dynamic algorithms of NetworKit attached to it More...

#include <ADS/interop/networkit/NetworKit.h>

Public types

using Weight = typename G::Weight
 the type of the weights
using Event = GraphEvent< Weight >
 the events of ADS

Public member functions

 NetworKitMirror (const G &g)
 the mirror of \( g \) as it is now, by toNetworKit()
 NetworKitMirror (const NetworKitMirror &)=delete
NetworKitMirror & operator= (const NetworKitMirror &)=delete
const NetworKit::Graph & graph (void) const
 the graph of NetworKit, on which the algorithms are built
int attach (NetworKit::DynAlgorithm &a, unsigned kinds=GraphEvents::EDGES)
 the algorithm \( a \) attached, told of the events of the kinds kinds [see GraphEvents]; its number
void detach (int id)
 the algorithm number \( \mathit{id} \) detached
std::size_t told (void) const
 the number of the events told to the algorithms, one per algorithm
void on (const NodeInserted &e)
 the node inserted
void on (const NodeDeleted &e) noexcept
 the node deleted, after its edges
void on (const EdgeInserted< Weight > &e)
 the edge inserted
void on (const EdgeDeleted< Weight > &e) noexcept
 the edge deleted
void on (const WeightChanged< Weight > &e)
 the weight of an edge changed
void on (std::span< const Event > s)
 the events of a batch, coalesced: the graph changed by all of them, then one updateBatch() for each algorithm, with those of its kinds

Detailed description

template<Graph G>
class ADS::networkit::NetworKitMirror< G >

a graph of NetworKit kept in step with a graph of ADS, as an observer of its ObservedGraph, which tells each change to the dynamic algorithms of NetworKit attached to it

Member typedef documentation

◆ Event

template<Graph G>
using ADS::networkit::NetworKitMirror< G >::Event = GraphEvent< Weight >

the events of ADS

◆ Weight

template<Graph G>
using ADS::networkit::NetworKitMirror< G >::Weight = typename G::Weight

the type of the weights

Constructor and destructor documentation

◆ NetworKitMirror() [1/2]

template<Graph G>
ADS::networkit::NetworKitMirror< G >::NetworKitMirror ( const G & g)
inlineexplicit

the mirror of \( g \) as it is now, by toNetworKit()

◆ NetworKitMirror() [2/2]

template<Graph G>
ADS::networkit::NetworKitMirror< G >::NetworKitMirror ( const NetworKitMirror< G > & )
delete

Member function documentation

◆ attach()

template<Graph G>
int ADS::networkit::NetworKitMirror< G >::attach ( NetworKit::DynAlgorithm & a,
unsigned kinds = GraphEvents::EDGES )
inline

the algorithm \( a \) attached, told of the events of the kinds kinds [see GraphEvents]; its number

◆ detach()

template<Graph G>
void ADS::networkit::NetworKitMirror< G >::detach ( int id)
inline

the algorithm number \( \mathit{id} \) detached

Precondition
it is attached

◆ graph()

template<Graph G>
const NetworKit::Graph & ADS::networkit::NetworKitMirror< G >::graph ( void ) const
inlinenodiscard

the graph of NetworKit, on which the algorithms are built

◆ on() [1/6]

template<Graph G>
void ADS::networkit::NetworKitMirror< G >::on ( const EdgeDeleted< Weight > & e)
inlinenoexcept

the edge deleted

◆ on() [2/6]

template<Graph G>
void ADS::networkit::NetworKitMirror< G >::on ( const EdgeInserted< Weight > & e)
inline

the edge inserted

◆ on() [3/6]

template<Graph G>
void ADS::networkit::NetworKitMirror< G >::on ( const NodeDeleted & e)
inlinenoexcept

the node deleted, after its edges

◆ on() [4/6]

template<Graph G>
void ADS::networkit::NetworKitMirror< G >::on ( const NodeInserted & e)
inline

the node inserted

◆ on() [5/6]

template<Graph G>
void ADS::networkit::NetworKitMirror< G >::on ( const WeightChanged< Weight > & e)
inline

the weight of an edge changed

◆ on() [6/6]

template<Graph G>
void ADS::networkit::NetworKitMirror< G >::on ( std::span< const Event > s)
inline

the events of a batch, coalesced: the graph changed by all of them, then one updateBatch() for each algorithm, with those of its kinds

◆ operator=()

template<Graph G>
NetworKitMirror & ADS::networkit::NetworKitMirror< G >::operator= ( const NetworKitMirror< G > & )
delete

◆ told()

template<Graph G>
std::size_t ADS::networkit::NetworKitMirror< G >::told ( void ) const
inlinenodiscard

the number of the events told to the algorithms, one per algorithm


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