igraph-help
[Top][All Lists]

## Re: [igraph] Graph.density => Usage in directed and undirected networks

 From: Gábor Csárdi Subject: Re: [igraph] Graph.density => Usage in directed and undirected networks Date: Thu, 13 Oct 2011 11:25:00 -0400

```Hi,

the density is simply the ratio of the number of realized edges and
the number of possible edges. At least igraph uses this definition.

Best,
Gabor

On Thu, Oct 13, 2011 at 11:22 AM, Carlos Eduardo <address@hidden> wrote:
> Hello,
>
>
>
> As it is showed bellow, I have two networks being one “directed” and other
> “undirected”. The relations are the same in both network, besides the fact
> that in directed network I have two edges linking each pair of vertex. I
> read in books like Wasserman & Faust (1994) that in directed networks it is
> necessary to divide the density by 2. I understood this argument in the
> “book”, but when I used the command “graph.density(g)”, the output was the
> same to both networks. So, it seems that isn’t necessary to divide the
> igraph output by 2. Is there any technical explanation to how igraph deals
> with this matter?
>
>
>
>
>
>
>
> Network 1
>
> Vertices: 4
>
> Edges: 4
>
> Directed: FALSE
>
> Edges:
>
> [0] '1' -- '3'
>
> [1] '2' -- '3'
>
> [2] '3' -- '4'
>
> [3] '1' -- '2'
>
>
>
> Network 2
>
> Vertices: 4
>
> Edges: 8
>
> Directed: TRUE
>
> Edges:
>
> [0] '1' -> '3'
>
> [1] '3' -> '2'
>
> [2] '3' -> '4'
>
> [3] '1' -> '2'
>
> [4] '3' -> '1'
>
> [5] '2' -> '1'
>
> [6] '2' -> '3'
>
> [7] '4' -> '3'
>
> _______________________________________________
> igraph-help mailing list
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>

--
Gabor Csardi <address@hidden>     MTA KFKI RMKI

```