[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 01:25:05 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
>>
>
>
>
- --
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
iQIcBAEBAgAGBQJKNDVRAAoJEGMobUVGH+HK0oYQAJ8LSPFW0ML2MXzGyS3eNVwk
R/X/jRUIJFpSgGX+za7z3A+SMNFZTOd/Ku0z2n9vtl20w1MZdugSCrRdghWp0BTw
cZoQ9OmsHC/MAtwirK9y3MnfoZZG10EcbOB4+vartmbOxLRiE4Vi3d317l3hoVUq
BA08pA8eaUIhjoiJRnl1gKS8d81tVaTPvG4zxckBnZ8AMB3tFYMZWCzu+8/eX3sP
PMBGGE3BvfZk80Y5fEWAPXRDD4r+cs4j8L+H3dy53Zxhx7yYzZTX6xt9YFf6lYuy
08sPjCINdSle455YIpSk6eVJqdUKio5JVEdy/XymTGaUKrpfS3vtt3R8kOvlDbna
F7oxl4XyxqSTSlirquTrzG9nxPW6fTDHdrNvomnNaCT/fTj/C05tpNroGIMYH48X
E2l9jhGjfDdkzdud2WGmNr7ZKL1F0PXRQndzRHPwudPxIaGDzRz6Wyr8yUXWjFJ0
AjmlT+gk061Xj/BHD3OdUht48KmMmWcXmPfGA0WTnjzeBstL0jeD5gLq9zNZRHY0
1cievhGT9+4f9W8G0iv2Ijvm82X5LU+2EQRal+vaxsSA+hGsMLuc8RgshFxQmZDt
MhXLAXjWkfd6x9zL7Ldo9LDwU5Z9VtXSDX0xeJvX9SB0LvWt+Zuihg96vawT780F
B2WsR5Ju6cBRvGPIbAm4
=i28Y
-----END PGP SIGNATURE-----