igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] triad census


From: Szabolcs Horvát
Subject: Re: [igraph] triad census
Date: Sun, 26 May 2013 17:17:26 -0400

Fortunately it is easy to implement this functionality yourself (at least for undirected graphs).

For the case of an undirected simple graph, there are four types of triads: with 0, 1, 2, or 3 edges.

The 0 and 1 case can be reduced to the 3 and 2 cases, respectively, by replacing every edge with a non-edge and vice versa.

The number of 2-edge triads is half the sum of the non-diagonal elements in A^2 where A is the adjacency matrix.
The number of 3-edge triads is 1/6 of the sum of the diagonal elements (trace) of A^3.


On 25 May 2013 10:05, jimi adams <address@hidden> wrote:
Hello all,
In running igraph 0.6.5-1 for R 3.0.0, I am getting a result that appears to be a recurrent bug from previous iterations (seeing similar errors reported elsewhere online). In calculating the triad census, it is reporting NaN for the first (003) result. Any suggestions?

thanks!

jimi adams
Assistant Professor
Department of Sociology
American University
e: address@hidden
w: jimiadams.com


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


reply via email to

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