Graph.h File Reference
#include <iostream>
#include <string>
#include <hash_map>
#include <climits>
#include "tulipconf.h"
#include "Reflect.h"
#include "PluginContext.h"
#include "PluginProgress.h"
#include "Node.h"
#include "Edge.h"
#include "ObservableGraph.h"
#include "cxx/Graph.cxx"
Include dependency graph for Graph.h:
This graph shows which files directly or indirectly include this file:
Namespaces
Enumerations
Functions
- TLP_SCOPE Graph * loadGraph (const std::string &filename)
- TLP_SCOPE bool saveGraph (Graph *, const std::string &filename)
- TLP_SCOPE Graph * importGraph (const std::string &alg, DataSet &dataSet, PluginProgress *plugProgress=0, Graph *newGraph=0)
- TLP_SCOPE bool exportGraph (Graph *graph, std::ostream &os, const std::string &alg, DataSet &dataSet, PluginProgress *plugProgress=0)
- TLP_SCOPE bool applyAlgorithm (Graph *graph, std::string &errorMsg, DataSet *dataSet=0, const std::string &alg="hierarchical", PluginProgress *plugProgress=0)
- TLP_SCOPE Graph * newGraph ()
- TLP_SCOPE Graph * newSubGraph (Graph *, std::string name="unnamed")
- TLP_SCOPE Graph * newCloneSubGraph (Graph *, std::string name="unnamed")
- TLP_SCOPE bool getSource (Graph *, node &n)
- TLP_SCOPE void copyToGraph (Graph *outG, Graph *inG, BooleanProperty *inSelection=0, BooleanProperty *outSelection=0)
- TLP_SCOPE void removeFromGraph (Graph *ioG, BooleanProperty *inSelection=0)
- TLP_SCOPE std::ostream & operator<< (std::ostream &, const tlp::Graph *)
- Print the graph (only nodes and edges) in ostream, in the tulip format.
Enumeration Type Documentation
Function Documentation
TLP_SCOPE bool tlp::applyAlgorithm |
( |
Graph * |
graph, |
|
|
std::string & |
errorMsg, |
|
|
DataSet * |
dataSet = 0 , |
|
|
const std::string & |
alg = "hierarchical" , |
|
|
PluginProgress * |
plugProgress = 0 |
|
) |
|
|
TLP_SCOPE void tlp::copyToGraph |
( |
Graph * |
outG, |
|
|
Graph * |
inG, |
|
|
BooleanProperty * |
inSelection = 0 , |
|
|
BooleanProperty * |
outSelection = 0 |
|
) |
|
|
|
Append the selected part of the graph inG (properties, nodes & edges) into the graph outG. If no selection is done (inSel=NULL), the whole inG graph is appended. The output selection is used to select the appended nodes & edges - Warning:
- The input selection is extended to all selected edge ends.
|
TLP_SCOPE bool tlp::exportGraph |
( |
Graph * |
graph, |
|
|
std::ostream & |
os, |
|
|
const std::string & |
alg, |
|
|
DataSet & |
dataSet, |
|
|
PluginProgress * |
plugProgress = 0 |
|
) |
|
|
TLP_SCOPE bool tlp::getSource |
( |
Graph * |
, |
|
|
node & |
n |
|
) |
|
|
|
find the first node of degree 0, if no node exist return false else true |
TLP_SCOPE Graph* tlp::importGraph |
( |
const std::string & |
alg, |
|
|
DataSet & |
dataSet, |
|
|
PluginProgress * |
plugProgress = 0 , |
|
|
Graph * |
newGraph = 0 |
|
) |
|
|
TLP_SCOPE Graph* tlp::loadGraph |
( |
const std::string & |
filename |
) |
|
|
|
Load a graph in the tlp format Warning : this function use "tlp" import plugin (must be laoded) |
TLP_SCOPE Graph* tlp::newCloneSubGraph |
( |
Graph * |
, |
|
|
std::string |
name = "unnamed" |
|
) |
|
|
|
Return a subgraph equal to the graph given in parameter (a clone subgraph) |
TLP_SCOPE Graph* tlp::newGraph |
( |
|
) |
|
|
TLP_SCOPE Graph* tlp::newSubGraph |
( |
Graph * |
, |
|
|
std::string |
name = "unnamed" |
|
) |
|
|
TLP_SCOPE std::ostream& operator<< |
( |
std::ostream & |
, |
|
|
const tlp::Graph * |
|
|
) |
|
|
|
Print the graph (only nodes and edges) in ostream, in the tulip format.
|
TLP_SCOPE void tlp::removeFromGraph |
( |
Graph * |
ioG, |
|
|
BooleanProperty * |
inSelection = 0 |
|
) |
|
|
|
Remove the selected part of the graph ioG (properties, nodes & edges). If no selection is done (inSel=NULL), the whole graph is reseted to default value. - Warning:
- The selection is extended to all selected edge ends.
|
TLP_SCOPE bool tlp::saveGraph |
( |
Graph * |
, |
|
|
const std::string & |
filename |
|
) |
|
|
|
Save a graph in tlp format Warning : this function use "tlp" export plugin (must be laoded) |
|