Geophysical Inversion and Modelling Library v1.5.4
Loading...
Searching...
No Matches
GIMLI::Dijkstra Class Reference

#include <ttdijkstramodelling.h>

Classes

class  ComparePairsClass_
 
class  DistancePair_
 
class  Edge_
 

Public Member Functions

 Dijkstra (const Graph &graph)
 
void setGraph (const Graph &graph)
 
void setStartNode (Index startNode)
 
void shortestPathTo (Index node, IndexArray &way) const
 
IndexArray shortestPathTo (Index node) const
 
IndexArray shortestPath (Index start, Index end)
 
double distance (Index root, Index node)
 
double distance (Index node)
 
RVector distances (Index root)
 
RVector distances () const
 
Graph & graph ()
 
const Graph & graph () const
 
GraphDistInfo graphInfo (Index na, Index nb)
 

Protected Attributes

std::vector< Edge_pathMatrix_
 
NodeDistMap distances_
 
Graph graph_
 
Index _root
 

Detailed Description

Dijkstra's shortest path finding

Member Function Documentation

◆ distance() [1/2]

double GIMLI::Dijkstra::distance ( Index node)

Distance to node to the last known root.

References distance().

◆ distance() [2/2]

double GIMLI::Dijkstra::distance ( Index root,
Index node )

Distance from root to node.

References distance().

Referenced by distance(), and distance().

◆ distances() [1/2]

RVector GIMLI::Dijkstra::distances ( ) const

All distances from to last known root.

References distances().

◆ distances() [2/2]

RVector GIMLI::Dijkstra::distances ( Index root)

All distances to root.

References distances().

Referenced by distances(), and distances().

◆ shortestPath()

IndexArray GIMLI::Dijkstra::shortestPath ( Index start,
Index end )

Get the shortest way from node index start to end.

References shortestPath(), and shortestPathTo().

Referenced by shortestPath().

◆ shortestPathTo() [1/2]

IndexArray GIMLI::Dijkstra::shortestPathTo ( Index node) const

Get the shortest way from root to node.

References shortestPathTo().

◆ shortestPathTo() [2/2]

void GIMLI::Dijkstra::shortestPathTo ( Index node,
IndexArray & way ) const

Get the shortest way from root to node. Inline version.

References GIMLI::Vector< ValueType >::clear(), GIMLI::Vector< ValueType >::resize(), and shortestPathTo().

Referenced by shortestPath(), shortestPathTo(), and shortestPathTo().