SimpleWeightedGraphs.jl icon indicating copy to clipboard operation
SimpleWeightedGraphs.jl copied to clipboard

transitiveclosure not supported

Open rapus95 opened this issue 4 years ago • 3 comments
trafficstars

if I need the transitive closure, how can I get that from a SimpleWeightedDiGraph?

rapus95 avatar Dec 09 '20 13:12 rapus95

Right now the best thing to do is to convert the SimpleWeightedDiGraph into a DiGraph and run transitiveclosure on that. It's not ideal but in 1.3.3 the transitiveclosure function only works on SimpleGraphs.

sbromberger avatar Dec 09 '20 14:12 sbromberger

does the DiGraph(.) copy? I.e. can I use transitiveclosure! ?

rapus95 avatar Dec 09 '20 15:12 rapus95

DiGraph(::SimpleWeightedDiGraph) will copy. That's why it's not ideal. But for your case, it might be, since ... yes, transitiveclosure! would be ok to use if you had no other use for the DiGraph.

sbromberger avatar Dec 09 '20 15:12 sbromberger