 |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
Go to the documentation of this file.
21 #ifndef __ctkDependencyGraph_h
22 #define __ctkDependencyGraph_h
25 #if !defined(NO_SYMBOL_EXPORT)
26 #include "ctkCoreExport.h"
28 #define CTK_CORE_EXPORT
33 class ctkDependencyGraphPrivate;
75 void findPaths(
int from,
int to, std::list<std::list<int>* >& paths);
78 void findPath(
int from,
int to, std::list<int>& path);
void findPaths(int from, int to, std::list< std::list< int > * > &paths)
void sourceVertices(std::list< int > &sources)
Retrieve all vertices with indegree 0.
ctkDependencyGraph(int nvertices)
bool cycleDetected() const
Return true if there is at least one cycle.
int cycleEnd() const
If a cycle has been detected, return the end of the cycle otherwise 0.
Class to implement a dependency graph, converted to STL instead of Qt.
virtual void processEdge(int, int)
Called each time an edge is visited.
int numberOfVertices() const
Get the number of vertices associated with current graph.
void setEdgeListToExclude(const std::list< int > &list)
int numberOfEdges() const
Get the number of edges associated with current graph.
virtual bool shouldExcludeEdge(int edge) const
ctkDependencyGraphPrivate * d_ptr
virtual ~ctkDependencyGraph()
void findPath(int from, int to, std::list< int > &path)
Retrieve the path between two vertices.
void insertEdge(int from, int to)
void setVerbose(bool verbose)
bool topologicalSort(std::list< int > &sorted, int rootId=-1)
bool checkForCycle()
Traverse graph and check for cycle.
void printAdditionalInfo() const
int cycleOrigin() const
If a cycle has been detected, return the origin of the cycle otherwise 0.