Tulip
5.2.1
Large graphs analysis and drawing

#include <TreeTest.h>
Static Public Member Functions  
static void  cleanComputedTree (Graph *graph, Graph *tree) 
static Graph *  computeTree (Graph *graph, PluginProgress *pluginProgress=nullptr) 
static bool  isFreeTree (const Graph *graph) 
static bool  isTree (const Graph *graph) 
static void  makeRootedTree (Graph *freeTree, node root) 
Performs test to check whether a graph is a simple or rooted tree. From wikipedia: "A tree is an undirected graph in which any two vertices are connected by exactly one simple path." Free trees have no designated root, while rooted trees do.
Definition at line 37 of file TreeTest.h.
Removes subgraphs created during tree computation. If graph and tree are the same graph, does nothing.
graph  The graph to clean from tree subgraphs. 
tree  The tree subgraph to remove. 

static 
Computes a rooted tree from the graph. If the graph is a rooted tree, the input graph is returned as is. If the graphs is a free tree, a rooted clone subgraph is returned. If the graph is connected, a rooted spanning tree of a clone subgraph is returned If the graph is not connected, computes a tree for each of the connected components of a clone subgraph, adds a simple source and returns the clone.
graph  The graph to compute a tree on. 
pluginProgress  reports progress on the computation. Defaults to 0. 

static 
Checks if the graph is a topological tree (i.e. if the graph was undirected, there would be no cycle).
Returns true if the graph is a topological tree (i.e. if the graph was undirected, there would be no cycle), false otherwise.
graph  The graph to check is a free tree. 

static 
Checks if the graph is a rooted tree (i.e. one node is designated as the root).
graph  The graph to check is a tree. 