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> > computeCanonicalOrdering(PlanarConMap *,
51 std::vector<edge> *dummyEdges = NULL,
52 PluginProgress *pluginProgress = NULL);
57 TLP_SCOPE std::vector<node> computeGraphCenters(Graph * graph);
63 TLP_SCOPE node graphCenterHeuristic(Graph * graph,
64 PluginProgress *pluginProgress = NULL);
69 TLP_SCOPE node makeSimpleSource(Graph* graph);
71 TLP_SCOPE
void makeProperDag(Graph* graph,std::list<node> &addedNodes,
72 TLP_HASH_MAP<edge,edge> &replacedEdges,
73 IntegerProperty* edgeLength = NULL);
81 TLP_SCOPE
void selectSpanningForest(Graph* graph, BooleanProperty *selectionProperty,
82 PluginProgress *pluginProgress = NULL);
90 TLP_SCOPE
void selectSpanningTree(Graph* graph, BooleanProperty *selection,
91 PluginProgress *pluginProgress = NULL);
99 TLP_SCOPE
void selectMinimumSpanningTree(Graph* graph,
100 BooleanProperty *selectionProperty,
101 NumericProperty *weight = NULL,
102 PluginProgress *pluginProgress = NULL);
112 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,
137 TLP_SCOPE
void dfs(
const Graph *graph, node root, std::vector<node>& nodes);
144 TLP_SCOPE
void dfs(
const Graph *graph, std::vector<node>& nodes);
150 TLP_SCOPE _DEPRECATED std::vector<node> dfs(
const Graph *graph,
157 TLP_SCOPE
void buildNodesUniformQuantification(
const Graph* graph,
const NumericProperty* prop,
unsigned int k, std::map<double, int>& mapping);
163 TLP_SCOPE
void buildEdgesUniformQuantification(
const Graph* graph,
const NumericProperty* prop,
unsigned int k, std::map<double, int>& mapping);
171 TLP_SCOPE
unsigned makeSelectionGraph(
const Graph* graph, BooleanProperty* selection,
bool* test=NULL);