| 1 | initial version |
Following up on vdelecroix's comment above, here's an example:
sage: G=graphs.PathGraph(5)
sage: G.distance(2,4)
2
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.