Check that a graph’s edge coloring is valid.
Takes a graph whose edges have an attribute color
and checks that no two neighboring edges have the same color
(i.e., the coloring is valid).
- Parameters:
graph (Graph) – A Graph
whose edges have an attribute color
.
- Returns:
True
if the edge coloring is valid, False
otherwise.
- Return type:
bool