igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Common neighbors


From: Tamas Nepusz
Subject: Re: [igraph] Common neighbors
Date: Mon, 5 Jun 2017 22:03:29 +0200

Is there an igraph C function to compute the common neighbors of two vertices v1, v2?

No, there isn't. Sorting the neighbor vectors in O(d log(d)) and comparing the sorted lists in O(d) is the way to go if you are using the library from C. Python, R and Mathematica all have built-in set functions that make this a whole lot easier.

T.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]