Closed Roconda closed 6 years ago
I'm not sure why this is, but you could use an integer representation of your decimal to get around it. If your decimal weight is 1.05 you could use 105 as the weight, or 1050 if you want another decimal place of precision, etc.
I made the following modifications and it seems to work: https://github.com/georgewhewell/libgraph/commit/548f3142511af36d2214df847bbc4c6624e59a7c
ymmv
Thanks a lot @georgewhewell 😄
Might be worth creating a pull request.
Addressed in #19
Hi,
I want to do path finding between multiple vertexes. I'm adding edges but my current weight values are decimal. The library returns the following message:
I understand that integers are faster and don't have rounding errors. What is the reason that weights must be an integer?
ps: thanks for the lib :-)