We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compute transitive reduction of a DAG . See https://dominikbraun.io/blog/graphs/reducing-graph-complexity-using-go-and-transitive-reduction/
n/a
I don't see a method implementing this.
v0.14.0
Yes, looks like
Maybe, i'm not familiar with the codebase, but the algorithm looks simple.
The text was updated successfully, but these errors were encountered:
That looks reasonable to add to path, or maybe topo.
type GraphReducer interface { graph.Directed graph.EdgeRemover } func TransitiveReduce(g GraphReducer) { uit := g.Nodes() for uit.Next() { uid := uit.Node().ID() vit := g.From(uid) for vit.Next() { w := traverse.DepthFirst{Traverse: func(e graph.Edge) bool { xid := e.To().ID() if g.HasEdgeFromTo(uid, xid) { g.RemoveEdge(uid, xid) } return true }} w.Walk(g, vit.Node(), nil) } } }
This will need some tests. I'd be happy to review a change if you want to send one.
Sorry, something went wrong.
No branches or pull requests
What are you trying to do?
Compute transitive reduction of a DAG . See https://dominikbraun.io/blog/graphs/reducing-graph-complexity-using-go-and-transitive-reduction/
What did you try?
n/a
How does Gonum not allow you to achieve your goal?
I don't see a method implementing this.
What version of Go and Gonum are you using?
v0.14.0
Is this feature absent from the current master?
Yes, looks like
Are you able to help contribute the feature?
Maybe, i'm not familiar with the codebase, but the algorithm looks simple.
The text was updated successfully, but these errors were encountered: