[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] simple example, graph.incidence skips directed parameter
From: |
Jose Quesada |
Subject: |
Re: [igraph] simple example, graph.incidence skips directed parameter |
Date: |
Sun, 14 Jun 2009 12:19:37 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Gabor,
Now I'm confused
Gábor Csárdi wrote:
> Jose,
>
> this was a bug for dense matrices only. If you use 'sparse=TRUE', then
> the 'directed' argument is fine. For dense matrices you cannot trust
> either 'directed' or 'mode'.
>
graph.incidence has no sparse parameter. Right?
> But, remember that the 'mode' argument is not fine for sparse matrices.
>
Is this the second bug I mentioned? or something else?
Best,
- -Jose
> G.
>
> On Sun, Jun 14, 2009 at 1:25 AM, Jose Quesada<address@hidden> wrote:
>
> Hi Gabor,
>
> Well, this is not a solution at all, since I have a large graph reading
> from a sparse matrix; using anything dense will result in the following
> error:
>
> CHOLMOD error: tF
> Error in asMethod(object) :
> Cholmod error 'problem too large' at file:../Core/cholmod_dense.c,
> line 106
> Error in as.vector(as(x, "matrix"), mode) :
> error in evaluating the argument 'x' in selecting a method for
> function 'as.vector'
>
> Still, when I run graph.incidence on a monster network, it seems to at
> least respect 'directed'.
>
>>>> dg = graph.incidence(m, directed=T, mode="out") # BUG
>>>>
>>>>
>>>> summary(dg)
> Vertices: 3024016
> Edges: 11463075
> Directed: TRUE
> No graph attributes.
> Vertex attributes: type, name.
> No edge attributes.
>
>
> Can I trust this?
>
> Best,
> -Jose
> Gábor Csárdi wrote:
>>>> Jose, thanks for the report, this was a bug. I have fixed it, and here
>>>> is a workaround that works with the currently released version:
>>>>
>>>> i <- igraph:::graph.incidence.dense(inc, directed=TRUE, mode="out",
>>>> weighted=NULL, multiple=FALSE)
>>>>
>>>> It is not perfect, because in fact the 'mode' parameter will be always
>>>> 'out', no matter what you set (for unweighted graphs at least), but
>>>> you can transpose the incidence matrix and then have the same as you
>>>> would with mode=="in".
>>>>
>>>> Thanks again, best,
>>>> Gabor
>>>>
>>>> On Fri, Jun 5, 2009 at 3:00 PM, Jose Quesada<address@hidden> wrote:
>>>>> Hi Gabor, Tamar, (all),
>>>>>
>>>>> In this simple example, graph.incidence skips directed parameter.
>>>>>
>>>>> inc <- matrix(sample(0:1, 15, repl=TRUE), 3, 5)
>>>>> colnames(inc) <- letters[1:5]
>>>>> rownames(inc) <- LETTERS[1:3]
>>>>> i <- graph.incidence(inc, directed=T)
>>>>> summary(i) # it's not a directed graph
>>>>>
>>>>> I have no idea why, because it certainly works on other (bigger)
>>>>> networks I'm using.
>>>>> Thoughts?
>>>>>
>>>>> Best,
>>>>> -Jose
>>>>>
>>>>> --
>>>>> Jose Quesada, PhD.
>>>>> Max Planck Institute,
>>>>> Center for Adaptive Behavior and Cognition -ABC-,
>>>>> Lentzeallee 94, office 224, 14195 Berlin
>>>>> http://www.josequesada.name/
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> igraph-help mailing list
>>>>> address@hidden
>>>>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>>>>>
>>>>
>>>>
>>
>>
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help
>>
- --
Jose Quesada, PhD.
Max Planck Institute,
Center for Adaptive Behavior and Cognition -ABC-,
Lentzeallee 94, office 224, 14195 Berlin
http://www.josequesada.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQIcBAEBAgAGBQJKNM64AAoJEGMobUVGH+HK2UcP/RRsLYdNQMD1XG5aX25zgfJ2
F+Uem+twMgMLTagSPbK5WQl2IEq9iWf4ye5O9u0bWPtC0a5X09ZyOqgUGlfNWOgC
FKh91gbGajqlqbPMqToN6foNuv5/F3ZLW9Dp1p6B1NsrYnxOON/8QxWGGdRGX9qG
0m1MAqCm/6QXpQdmNb04D1sYfwlOxi9QKhkUZokcJ3Ir2JIEPxpEdiEX5e52la43
uE+MOZbxE/dFAKphEZLJ4Ef7eGDS3H1HymvLamz1gh7bQjuTEEUsjTBU3bZKgSuG
FJGvzcWUY3+LOrDWZCQX/ulzKFptozCuwvBZbO23buxuQKqtll1R7COr8+kSnyPP
FTy3idVdbdNM8QpPS8ksJuvf3YDuwFzqdPw3grib4hQMGL0VvOYF0mz1Pt65FEEc
mL2Es8vcUe1yrxxLEVcNid+8aQi5rqNVqOxIvulF3mjxm7EutfNWQ9U9vGERKTh5
vXN0AegBNYz/NZBXqoYkW7ehdwf92mGl91qZP/Xv3gPlnCRvIhphivPhrLp+rBb1
418/b8TKaS5pPp0DMMqLYZpVYfzoxf/ZyQlOZaWmXPaCJXgMF/6t1rDLKLVNDger
MJjS9Gb9IBpdCcROrcCbrEUS5MrUjFeoS6HOob8PtCD4ZxMMaKe0aPr4OPLYxalK
RB9836tZopUx0FgvJtrp
=WjHH
-----END PGP SIGNATURE-----