Average neighbour-neighbour correlation

I was wondering, how does avg_neighbour_corr define a neighbour? More
specifically, if I look at "out" "out" correlation, does graph-tool look at
all neighbours of a given vertex or only at those which are connected by an
outgoing edge from the source vertex?




avg_neighbour_corr considers as neighbours of v the targets of edges
for which v is source.

The documentation on the website already states this correlation in
terms of 'source' and 'target', and in any case it is pretty
straightforward to check what it is doing... but if you want to dig it
you'll end up looking at a c++ class called GetNeighboursPairs.

Generally, you should usually expect directedness to be respected, and
either use g.set_directed() or a GraphView if you want to treat the
graph as undirected for some measure.

If you need to correlate a directed measure while treating the graph as
undirected, for example for avg_neighbour_corr to correlate in-degrees
disregarding edge direction, create a property map to record the
directed measure, then turn the graph into undirected and run the
correlation for the recorded property.

Hope this helps,