igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] maximal.cliques returns duplicates


From: Tony Larson
Subject: Re: [igraph] maximal.cliques returns duplicates
Date: Mon, 18 Nov 2013 16:57:45 +0000

OK, 
Here's a toy example (and on the latest igraph) - still not behaving as expected??

> mat <- matrix(sample(c(0,1), 100 * 100, replace = TRUE, prob = c(0.8, 0.2)), 100, 100)
> g <- graph.adjacency(mat, mode = "undirected", weighted = TRUE, diag = FALSE)
> mc <- maximal.cliques(g)
> any(duplicated(unlist(mc)))
[1] TRUE
> g <- simplify(g)
> mc <- maximal.cliques(g)
> any(duplicated(unlist(mc)))
[1] TRUE
> sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=C                 LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
 [1] reshape_0.8.4      plyr_1.8           Matrix_1.0-12      lattice_0.20-15
 [5] xcms_1.37.2        Biobase_2.20.1     BiocGenerics_0.6.0 mzR_1.6.1
 [9] Rcpp_0.10.4        igraph_0.6.5-2

loaded via a namespace (and not attached):
[1] codetools_0.2-8 grid_3.0.0      tcltk_3.0.0     tools_3.0.0
>





On 18 November 2013 15:31, Gábor Csárdi <address@hidden> wrote:
Btw. you can also try to remove multiple and loop edges if you have
any. Just a guess, maybe they are not a problem, but it's worth
trying, just call simplify() on the graph.

G.

On Mon, Nov 18, 2013 at 10:27 AM, Tony Larson <address@hidden> wrote:
> Will try and work up a toy example later this afternoon, as the graph I am
> working on is too large to post  (generated from a 4000 x 4000 adjacency
> matrix).
>
> Thanks
> Tony
>
> On 18 Nov 2013 15:06, "Gábor Csárdi" <address@hidden> wrote:
>>
>> Hi!
>>
>> On Mon, Nov 18, 2013 at 10:00 AM, Tony Larson <address@hidden>
>> wrote:
>> > Hi,
>> > I am using igraph 0.6.2 on R.
>>
>> That is 0.6-2, right? Note that there is a newer version. I can't
>> recall any changes in maximal cliques, though, so it won't fix your
>> issue, probably, but it fixes other issues.
>>
>> > When I use maximal.cliques() to get a list of
>> > complete subgraphs back, several have partly duplicated values, e.g
>> >
>> > [1] 1 2 3 4 5
>> > [2] 1 2 3 4 5 7 8
>> > [3] 1 2 3 4 5 6
>> >
>> > If all vertices in each listing are completely connected, then why in
>> > the
>> > example above don't I get  single list entry for indices 1:8?
>>
>> If you do, then this is a bug. Can you please show us an example that
>> reproduces it? Thanks.
>>
>> Gabor
>>
>> > Why do I get
>> > 3? How can I merge these into one list item?
>> >
>> > Thanks
>> > Tony
>> >
>> >
>> > _______________________________________________
>> > igraph-help mailing list
>> > address@hidden
>> > https://lists.nongnu.org/mailman/listinfo/igraph-help
>> >
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>

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



--
***************************************
Dr. Tony R. Larson
CNAP
Department of Biology, Area 7
University of York
Wentworth Way
Heslington
York YO10 5DD
UK

Tel: +44(0)1904 328 826 (office)
Tel: +44(0)7833 471 685 (mobile)
Fax: +44(0)1904 328 762
E-mail: address@hidden
***************************************

Times Higher Education University of the Year 2010


Disclaimer: This email and any
attachment(s) are strictly confidential
and contain information intended only
for the use of the individual(s) named
above.  If you are not the intended
recipients please delete this message
from your system, do not use or
disclose the information in any way and
notify us by return e-mail.


reply via email to

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