igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Diameter vs. longest shortest paths


From: Claudia Muller-Birn
Subject: Re: [igraph] Diameter vs. longest shortest paths
Date: Tue, 8 Mar 2011 16:22:24 +0100

Hi Tamas,

> [...] 
> 
> 2. diameter() and shortest.paths() behave differently when the graph is
> not strongly connected (like in your case). For instance, in your second
> example, it is impossible to reach vertex 8 from vertex 3. In such
> cases, diameter() calculates the diameter of the largest connected
> component and returns that (check out the "unconnected" parameter in
> help(diameter)), while shortest.paths() uses a value of infinity (if I
> remember correctly).

Yes, the function shortest.paths() returns "inf".

> Regarding weights: if you have a "weight" attribute, then diameter() and
> shortest.paths() will use that. If you want to use some other edge
> attribute or an arbitrary vector as weights, you can pass that in the
> weights=... argument.

O.k., this is what I assumed. Interestingly other network tools seems to be not 
that sophisticated :) 

Thank you!

Best, Claudia

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




reply via email to

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