Consider the graph:
<< IGraphM` (* package *)
net = RandomGraph[BarabasiAlbertGraphDistribution[2000000, 1]];
net2 = Graph[net, EdgeWeight -> RandomInteger[{1, 20}, EdgeCount[net]]];
ver = VertexList[net2];
bin = {3};
list = IGDistanceHistogram[net2, bin[[1]], {ver[[10]]}]
Sometimes, for a large networks and a large set of 'bin' calculations take a long time. However, I am only interested in the first value of the list 'list':
FinalResult=list[[1]]
How to force the IGDistanceHistogram[] command to count only the value for the first bin size?
First@IGDistanceHistogram[...]
and have the calculation finish faster? Is the question about performance? $\endgroup$