1 Jun 2012 23:32

## shortest distance in filtered graph doesn't work properly

```Hello,

I'm using a graph filtered with the minimum spanning tree and
calculating the shortest distance for all the vertices.

when capturing the array of distances for the vertex with index 0 it gives me:

>>> dist1
array([         0, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647,          1, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647,          1, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
2147483647, 2147483647, 2147483647, 2147483647, 2147483647,
```

4 Jun 2012 00:42

### Re: shortest distance in filtered graph doesn't work properly

```On 06/01/2012 11:32 PM, Héctor Urbina wrote:
> Hello,
>
> I'm using a graph filtered with the minimum spanning tree and
> calculating the shortest distance for all the vertices.
>
> when capturing the array of distances for the vertex with index 0 it gives me:

[...]

> as if the algorithm were checking for a direct edge between each pair
> of vertices instead of searching for the shortest path and giving the
> appropriate distance.

Are you sure your graph is undirected?

Please provide a complete example so I can understand what is going on.

Cheers,
Tiago

--

--
Tiago de Paula Peixoto <tiago <at> skewed.de>

```
```_______________________________________________
graph-tool mailing list
graph-tool <at> skewed.de
http://lists.skewed.de/mailman/listinfo/graph-tool
```