Add tests for lambda as an edge weights map.
Raise ArgumentError when edge weight is negative or undefined.