tests.fixtures.weighted_graphs

tests.fixtures.weighted_graphs#

Graphs with weights set on all edges.

Functions

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.

graph_cheapest_is_shortest()

This graph is a fairly common case in the wild where the cheapest path is also the shortest, but it is not homogenously weighted.

graph_neg_weight_no_loops()

This graph is set up with a single edge with negaitve weight.

Classes

WeightedDirectedEdge([v1, v2, weight, uid, ...])

A subclass of DirectedEdge which supports a custom weight attribute.