Skip to content
New issue

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

A new graph instance should be passed to iterate #1

Open
JLHwung opened this issue Jul 1, 2017 · 0 comments
Open

A new graph instance should be passed to iterate #1

JLHwung opened this issue Jul 1, 2017 · 0 comments

Comments

@JLHwung
Copy link

JLHwung commented Jul 1, 2017

On the iterate step, the graph g is passed to iterate. However, as ContractEdge mutates the graph, it will render contracted g passed to iterate on the second and all the following rounds.

https://github.com/chasestarr/mincut/blob/master/mincut.go#L17 should have been something like

if m := iterate(g.Clone(), listedTwice); m < min {
    min = m
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant