On Jun 17, 2007, at 1:17 PM, Stan Novogroudski wrote:
> Hi Trevor,
> thanks for your rapid answer, but it does not helped.
>
> I try to set costs of moving between two nodes. It must be possible to
> set one cost in one direction but another back. Thats works until all
> costs in graph are different. If I set same cost to another Edge, the
> second settled is ignored.
> I really do not understand, why another edges are ignored.
>
> Stan
You are using addEdge() incorrectly. Look at the API documentation
carefully. The method takes an Edge object as its final parameter,
not a weight. Remove the final parameter and you should find that all
edges are added correctly.
If you want to set the weight of an edge, use
WeightedGraph.setEdgeWeight().
Trevor
|