21 #ifndef _TLPGRAPHMEASEURE_H 22 #define _TLPGRAPHMEASEURE_H 26 #include <tulip/Node.h> 27 #include <tulip/MutableContainer.h> 28 #include <tulip/DoubleProperty.h> 29 #include <tulip/StaticProperty.h> 35 enum EDGE_TYPE { UNDIRECTED = 0, INV_DIRECTED = 1, DIRECTED = 2 };
36 #define IN_EDGE INV_DIRECTED 37 #define OUT_EDGE DIRECTED 38 #define INOUT_EDGE UNDIRECTED 46 TLP_SCOPE
double averagePathLength(
const Graph *g);
53 TLP_SCOPE
double averageClusteringCoefficient(
const Graph *);
62 TLP_SCOPE _DEPRECATED
void clusteringCoefficient(
const Graph *g, MutableContainer<double> &result,
63 unsigned int maxDepth = 1);
71 TLP_SCOPE
void clusteringCoefficient(
const Graph *g, tlp::NodeStaticProperty<double> &result,
72 unsigned int maxDepth = 1);
79 TLP_SCOPE _DEPRECATED
void dagLevel(
const Graph *graph, MutableContainer<unsigned int> &level);
90 TLP_SCOPE
void degree(
const Graph *graph, tlp::NodeStaticProperty<double> °,
91 EDGE_TYPE direction = UNDIRECTED, NumericProperty *weights =
nullptr,
100 TLP_SCOPE
void dagLevel(
const Graph *graph, tlp::NodeStaticProperty<unsigned int> &level);
102 TLP_SCOPE
unsigned int maxDegree(
const Graph *);
104 TLP_SCOPE
unsigned int minDegree(
const Graph *);
112 TLP_SCOPE _DEPRECATED
unsigned int maxDistance(
const Graph *graph,
const node n,
113 MutableContainer<unsigned int> &distance,
114 EDGE_TYPE direction = UNDIRECTED);
122 TLP_SCOPE
unsigned int maxDistance(
const Graph *graph,
const unsigned int nPos,
123 tlp::NodeStaticProperty<unsigned int> &distance,
124 EDGE_TYPE direction = UNDIRECTED);
132 TLP_SCOPE _DEPRECATED
void reachableNodes(
const Graph *graph,
const node startNode,
133 std::set<node> &result,
unsigned int maxDistance,
134 EDGE_TYPE direction = UNDIRECTED);
143 TLP_SCOPE
void markReachableNodes(
const Graph *graph,
const node startNode,
144 TLP_HASH_MAP<node, bool> &reachables,
unsigned int maxDistance,
145 EDGE_TYPE direction = UNDIRECTED);