tests.fixtures.weighted_graphs.graph_cheapest_is_longest

tests.fixtures.weighted_graphs.graph_cheapest_is_longest#

tests.fixtures.weighted_graphs.graph_cheapest_is_longest()#

This graph is set up with a fewer-hops path between two nodes that is more expensive than another path with more hops. It is meant to ensure pathfinding weight evaluation is working properly.

left to right direction

object 0
object 1
object 2
object 3
object 4
object 5

0 --> 1 : 1
1 --> 2 : 2
2 --> 3 : 3
3 --> 4 : 4
4 --> 5 : 5
0 --> 5 : 20

Returns:

a two-tuple containing a Universe of the graph, and a list of all Vertex objects. The order of this list is shown by the numbers in the above diagram; the number of a vertex is its index in the list.

Edges on the graph have a weight attribute.