21 #ifndef _TLPGRAPHTOOLS_H 22 #define _TLPGRAPHTOOLS_H 28 #include <tulip/tulipconf.h> 29 #include <tulip/tuliphash.h> 30 #include <tulip/Node.h> 31 #include <tulip/Edge.h> 34 class BooleanProperty;
37 class IntegerProperty;
38 class NumericProperty;
50 TLP_SCOPE std::vector<std::vector<node>>
51 computeCanonicalOrdering(PlanarConMap *, std::vector<edge> *dummyEdges =
nullptr,
52 PluginProgress *pluginProgress =
nullptr);
57 TLP_SCOPE std::vector<node> computeGraphCenters(Graph *graph);
63 TLP_SCOPE node graphCenterHeuristic(Graph *graph, PluginProgress *pluginProgress =
nullptr);
68 TLP_SCOPE node makeSimpleSource(Graph *graph);
70 TLP_SCOPE
void makeProperDag(Graph *graph, std::list<node> &addedNodes,
71 TLP_HASH_MAP<edge, edge> &replacedEdges,
72 IntegerProperty *edgeLength =
nullptr);
80 TLP_SCOPE
void selectSpanningForest(Graph *graph, BooleanProperty *selectionProperty,
81 PluginProgress *pluginProgress =
nullptr);
89 TLP_SCOPE
void selectSpanningTree(Graph *graph, BooleanProperty *selection,
90 PluginProgress *pluginProgress =
nullptr);
98 TLP_SCOPE
void selectMinimumSpanningTree(Graph *graph, BooleanProperty *selectionProperty,
99 NumericProperty *weight =
nullptr,
100 PluginProgress *pluginProgress =
nullptr);
111 TLP_SCOPE
void bfs(
const Graph *graph, node root, std::vector<node> &nodes);
119 TLP_SCOPE
void bfs(
const Graph *graph, std::vector<node> &nodes);
125 TLP_SCOPE _DEPRECATED std::vector<node> bfs(
const Graph *graph, node root = node());
138 TLP_SCOPE
void dfs(
const Graph *graph, node root, std::vector<node> &nodes);
146 TLP_SCOPE
void dfs(
const Graph *graph, std::vector<node> &nodes);
152 TLP_SCOPE _DEPRECATED std::vector<node> dfs(
const Graph *graph, node root = node());
158 TLP_SCOPE
void buildNodesUniformQuantification(
const Graph *graph,
const NumericProperty *prop,
159 unsigned int k, std::map<double, int> &mapping);
165 TLP_SCOPE
void buildEdgesUniformQuantification(
const Graph *graph,
const NumericProperty *prop,
166 unsigned int k, std::map<double, int> &mapping);
175 TLP_SCOPE
unsigned makeSelectionGraph(
const Graph *graph, BooleanProperty *selection,
176 bool *test =
nullptr);
183 enum ShortestPathType {
188 AllDirectedPaths = 4,
204 TLP_SCOPE
bool selectShortestPaths(
const Graph *
const graph, node src, node tgt,
205 ShortestPathType pathType,
const DoubleProperty *
const weights,
206 BooleanProperty *selection);