[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [igraph] diameter

**From**: |
Tamas Nepusz |

**Subject**: |
Re: [igraph] diameter |

**Date**: |
Tue, 17 Aug 2010 23:57:48 +0100 |

>* I noticed a definition about diameter of a graph in the manuel: unconnected *
>* Logical, what to do if the graph is unconnected. If FALSE, the function will *
>* return the largest possible diameter which is the number of vertices.*
Well, the wording may be ambiguous as the largest possible diameter is indeed
the number of vertices - 1; what igraph returns is one larger than the largest
possible diameter:
>* library(igraph)*
>* g <- graph.ring(5) %du% graph.ring(5)*
>* diameter(g, unconnected=F)*
[1] 10
--
Tamas