Hi, > I would like you to help to solve the following problem. I need to calculate > the sum of all distances of a vertex " i " to all its k neighbors. I'm not sure I understand what you mean -- surely, if some vertex j is a neighbor of i, then the distance of i and j is 1 (otherwise they wouldn't be neighbors, would they?), so you simply need the degree of each vertex.
Or do you actually mean that the vertices are embedded in some k-dimensional space and you have some kind of a distance function that tells the "actual" distance of any two vertices? T. _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
