igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Calculation of Coordination Number


From: uxzmdlj02
Subject: Re: [igraph] Calculation of Coordination Number
Date: Tue, 12 Feb 2008 19:07:12 -0600

Lorenzo,
if your graph is `g` then
    degree(g)
gives the number of direct neighbors of each vertex (or particle). So
    mean(degree(g))
should give mean nubmer of edges taken across all particles. If it's a directed graph you can specify the 'mode' argument of degree(). (and to turn an adjacency matrix `am` into an igraph object `g` just use "g <- graph.adjacency(am)")
Peter

On Feb 12, 2008, at 7:02 PM, Lorenzo Isella lorenzo.isella-at- ......... |igraph-help| wrote:

Dear All,
Probably I am not using the right terminology, but I am studying aggregates of physical particles rather than "traditional graphs". The problem is the following: suppose you are given an adjacency matrix. You can identify (via igraph) the connected components. But now, you want to calculate how many edges each node has on average. If we were talking about particles, this would be the mean number of first neighbors each particle has (and would give an idea of the openness of the aggregate). Any idea about how this can be achieved in igraph? In case it matters, I am primarily using the Python bindings.
Many thanks

Lorenzo


_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help





reply via email to

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