Skip to content
This repository was archived by the owner on Nov 27, 2021. It is now read-only.

Implemented WeightedGraph::PositiveWeightedGraph

Latest

Choose a tag to compare

@msayson msayson released this 27 Apr 07:42
· 3 commits to master since this release

WeightedGraph::PositiveWeightedGraph API

WeightedGraph::PositiveWeightedGraph extends WeightedGraph::Graph and shares its behaviour, with the following differences:

# Add directed edge (source, destination) to the graph with given weight
# Requires that weight is a positive number
add_edge(source, destination, weight)

# Add undirected edge (vertex_a, vertex_b) to the graph with given weight
# Requires that weight is a positive number
add_undirected_edge(vertex_a, vertex_b, weight)