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

Compile errors in dag from g.Has, g.RemoveEdge, and g.Marshall #2

Open
GrumpyOldTroll opened this issue Feb 27, 2019 · 0 comments
Open

Comments

@GrumpyOldTroll
Copy link

GrumpyOldTroll commented Feb 27, 2019

~/gopath/src/github.com/jicksta/ranked-pairs-voting/cli$ go build main.go
# github.com/jicksta/ranked-pairs-voting
../dag.go:31:7: g.Has undefined (type *simple.DirectedGraph has no field or method Has)
../dag.go:36:7: g.Has undefined (type *simple.DirectedGraph has no field or method Has)
../dag.go:51:15: not enough arguments in call to g.RemoveEdge
        have (simple.Edge)
        want (int64, int64)
../dag.go:79:23: too many arguments in call to dot.Marshal
        have (*simple.DirectedGraph, string, string, string, bool)
        want (graph.Graph, string, string, string)

I've never used go before, so I worked around this by adding a .Has function inside my local gonum.org/v1/gonum/graph/simple/directed.go, by using fromID and toID instead of newEdge, and by removing the bool on the end, respectively. But ideally somebody who knows what they're doing could patch this or point me to the right way to work around this. (is there some other library path for simple that it should be using?)

GrumpyOldTroll added a commit to GrumpyOldTroll/ranked-pairs-voting that referenced this issue Mar 9, 2019
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