All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
NetworKit::DynAPSP Class Reference

Dynamic APSP. More...

#include <DynAPSP.h>

Public Member Functions

 DynAPSP (Graph &G)
 Creates the object for G. More...
 
void run () override
 initialize distances and Pred by repeatedly running the Dijkstra2 algorithm More...
 
void update (GraphEvent e) override
 Updates the pairwise distances after an edge insertions on the graph. More...
 
void updateBatch (const std::vector< GraphEvent > &batch) override
 Updates the pairwise distances after a batch of edge insertions on the graph. More...
 
count visPairs ()
 Returns number of visited pairs. More...
 
std::vector< nodegetPath (node u, node v)
 Returns a vector containing a shortest path from node u to node v, and an empty path if u and v are not connected. More...
 
- Public Member Functions inherited from NetworKit::APSP
 APSP (const Graph &G)
 Creates the APSP class for G. More...
 
virtual ~APSP ()=default
 
virtual std::string toString () const override
 
std::vector< std::vector
< edgeweight > > 
getDistances () const
 Returns a vector of weighted distances between node pairs. More...
 
edgeweight getDistance (node u, node v) const
 Returns the distance from u to v or infinity if u and v are not connected. More...
 
virtual bool isParallel () const override
 
- Public Member Functions inherited from NetworKit::Algorithm
 Algorithm ()
 Constructor to the algorithm base class. More...
 
virtual ~Algorithm ()=default
 Virtual default destructor. More...
 
bool hasFinished () const
 Indicates whether an algorithm has completed computation or not. More...
 
void assureFinished () const
 Assure that the algorithm has been run, throws a std::runtime_error otherwise. More...
 
- Public Member Functions inherited from NetworKit::DynAlgorithm
virtual ~DynAlgorithm ()=default
 Virtual default destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from NetworKit::APSP
const GraphG
 
std::vector< std::vector
< edgeweight > > 
distances
 
- Protected Attributes inherited from NetworKit::Algorithm
bool hasRun
 A boolean variable indicating whether an algorithm has finished its computation or not. More...
 

Detailed Description

Dynamic APSP.

Constructor & Destructor Documentation

NetworKit::DynAPSP::DynAPSP ( Graph G)

Creates the object for G.

Parameters
GThe graph.

Member Function Documentation

std::vector< node > NetworKit::DynAPSP::getPath ( node  u,
node  v 
)

Returns a vector containing a shortest path from node u to node v, and an empty path if u and v are not connected.

void NetworKit::DynAPSP::run ( )
overridevirtual

initialize distances and Pred by repeatedly running the Dijkstra2 algorithm

Run method that stores a single shortest path for each node pair and stores shortest distances.

Reimplemented from NetworKit::APSP.

void NetworKit::DynAPSP::update ( GraphEvent  e)
overridevirtual

Updates the pairwise distances after an edge insertions on the graph.

Notice: it works only with edge insertions.

Parameters
eThe edge insertions.

Implements NetworKit::DynAlgorithm.

void NetworKit::DynAPSP::updateBatch ( const std::vector< GraphEvent > &  batch)
overridevirtual

Updates the pairwise distances after a batch of edge insertions on the graph.

Notice: it works only with edge insertions.

Parameters
batchThe batch of edge insertions.

Implements NetworKit::DynAlgorithm.

count NetworKit::DynAPSP::visPairs ( )

Returns number of visited pairs.


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