igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] different result with "sparse" = T or F in get.adjacency


From: Gábor Csárdi
Subject: Re: [igraph] different result with "sparse" = T or F in get.adjacency
Date: Mon, 24 Aug 2009 10:05:23 +0200

This is a known bug, it is already corrected in the 0.6 branch.
get.adjacency doubles the loop edges if sparse=TRUE.
https://bugs.launchpad.net/igraph/+bug/303096

Gabor

On Sun, Aug 23, 2009 at 1:11 PM, Sylvain Loiseau<address@hidden> wrote:
> Hi,
>
> I was struggling for having sparse adjacency matrix and just found that it
> is implemented in get.adjacency... :-(
>
> But I don't understand while there is a difference between the two following
> adjacency matrix (the first with "sparse=T", the second with "sparse=F"),
> based on a graph with loop :
>
> # the graph used
>>
>> reflexif(clique3k)
>
> Vertices: 3
> Edges: 6
> Directed: FALSE
> Edges:
>
> [0] 'A' -- 'B'
> [1] 'B' -- 'C'
> [2] 'A' -- 'C'
> [3] 'A' -- 'A'
> [4] 'B' -- 'B'
> [5] 'C' -- 'C'
>
>> get.adjacency(reflexif(clique3k), sparse=T)
>
> 3 x 3 sparse Matrix of class "dgTMatrix"
>  A B C
> A 2 1 1
> B 1 2 1
> C 1 1 2
>
>> get.adjacency(reflexif(clique3k))
>
>  A B C
> A 1 1 1
> B 1 1 1
> C 1 1 1
>
> Best,
> Sylvain
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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