Add a function to create unit weight digraphs or make edge weight functions work with unweighted digraphs
It would be nice if there was a function to create an edge-weighted digraph from a given digraph by assigning each edge a weight of 1, e.g. UnitEdgeWeightedDigraph(D). Currently if you want to do this you need to call something like
gap> EdgeWeightedDigraph(D, List(DigraphVertices(D), x -> ListWithIdenticalEntries(OutDegreeOfVertex(D, x), 1)));
which is a bit cumbersome, especially when using the gap REPL. The reason for having such a function is that it is sometimes useful to call weighted digraph functions such as DigraphMaximumFlow on unweighted digraphs by assuming each edge has unit weight.
An alternative would be to modify the weighted graph functions to also accept unweighted digraphs as input, and automatically add unit weights to them if they are unweighted, but this might be a bit harder to maintain.
@mtorpey any thought on this, specifically on letting weighted digraph functions accept unweighted digraphs?
I quite like a special UnitEdgeWeightedDigraph(D) function! This would be only a small extra effort on users' part if they want to use the edge-weighted digraph functions with unit weights, and would avoid confusion.
Definitely a good newcomer issue too.
Perhaps one for @coraaked