JuliaGraphs/SimpleWeightedGraphs.jl

the `laplacian_matrix` method has a different `dir` parameter default than in `Graphs.jl`, making the doc confusing

kragol opened this issue · 2 comments

The laplacian_matrix function for SimpleWeightedDigraph uses dir=:out as default for the dir parameter. This contrasts with the definition in Graphs.jl where dir=:both is the default for directed graphs.

While I may agree that dir=:out could be a saner default, the problem is that the documentation of the function is only present in the Graphs package and mentions that the default is dir=:both for directed graphs. After looking at the doc at the REPL, the user may expect the default to be dir=:both when it is in fact dir=:out for SimpleWeightedDigraph.

I agree the inconsistency isn't great here. Feel free to open a PR to standardize on dir=:both here

Changing the default parameter would be breaking, instead I'm just adding this note to the docstring