[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Locating triangles in (directed) (massive) graphs
From: |
Mona Jalal |
Subject: |
Re: [igraph] Locating triangles in (directed) (massive) graphs |
Date: |
Mon, 10 Feb 2014 17:52:02 -0600 |
Hi,
This function sounds to work for me.
Also I was looking at triad.census() and looking at its manual couldn't figure
out how to interpret the output. Can you please help with that?
> g <- erdos.renyi.game(15, 45, type="gnm", dir=TRUE)
> triad.census(g)
[1] 113 168 38 16 13 49 23 17 7 2
[11] 2 1 2 2 2 0
> str(g)
IGRAPH D--- 15 45 -- Erdos renyi (gnm) graph
+ attr: name (g/c), type (g/c), loops
(g/x), m (g/n)
+ edges:
1 -> 3 4 6 12 13 2 -> 1 3 7
3 -> 2 5 10 15 4 -> 5 12 14
5 -> 6 7 9 6 -> 4 8 12
7 -> 5 9 12 8 -> 2 7 15
9 -> 1 4 11 13 10 -> 4 5 8
11 -> 1 2 9 12 -> 1 4 14 15
13 -> 15 14 -> 11 12
15 -> 3
> maximal.cliques(g)
[[1]]
[1] 13 15
[[2]]
[1] 13 1 9
[[3]]
[1] 2 8 7
[[4]]
[1] 2 1 3
[[5]]
[1] 2 1 11
[[6]]
[1] 3 5 10
[[7]]
[1] 3 15
[[8]]
[1] 4 14 12
[[9]]
[1] 4 10 5
[[10]]
[1] 4 5 6
[[11]]
[1] 4 5 9
[[12]]
[1] 4 1 9
[[13]]
[1] 4 1 12 6
[[14]]
[1] 5 7 9
[[15]]
[1] 6 8
[[16]]
[1] 7 12
[[17]]
[1] 8 15
[[18]]
[1] 8 10
[[19]]
[1] 9 1 11
[[20]]
[1] 11 14
[[21]]
[1] 12 15
Warning message:
In maximal.cliques(g) :
At maximal_cliques_template.h:203 :Edge directions are ignored for maximal
clique calculation
Best regards,
Mona Jalal.
On 02/10/14, Tamás Nepusz wrote:
> > I was wondering if igraph (or linkcomm) might have any command for locating
> > the triangles (or k-cliques) in a (massive) graph?
>
> What’s wrong with igraph_maximal_cliques (in the C core; in R it is
> maximal.cliques(), in Python it is Graph.maximal_cliques())?
>
> T.
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help