digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::Graph< VertexProperties, EdgeProperties >::Path Class Reference

Helper class to find paths through the graph. More...

Public Member Functions

bool isReachable (const Vertex &v) const
 
template<class GraphType >
void longestPath (const GraphType &graph, const Vertex &v)
 
template<class GraphType >
void shortestPath (const GraphType &graph, const Vertex &v)
 

Public Attributes

VertexIntMap distances
 
VertexVertexMap predecessors
 

Detailed Description

template<class VertexProperties, class EdgeProperties>
class Digikam::Graph< VertexProperties, EdgeProperties >::Path

Call one of the methods and then read the maps.

Member Function Documentation

◆ longestPath()

template<class VertexProperties , class EdgeProperties >
template<class GraphType >
void Digikam::Graph< VertexProperties, EdgeProperties >::Path::longestPath ( const GraphType &  graph,
const Vertex v 
)
inline

We provide a constant weight of 1.

Invert the default compare method: With greater, we get the longest path.

Will be returned if a node is unreachable.

Store distance and predecessors in QMaps, wrapped to serve as property maps.

◆ shortestPath()

template<class VertexProperties , class EdgeProperties >
template<class GraphType >
void Digikam::Graph< VertexProperties, EdgeProperties >::Path::shortestPath ( const GraphType &  graph,
const Vertex v 
)
inline

we provide a constant weight of 1.

Store distance and predecessors in QMaps, wrapped to serve as property maps.