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

cycle_ratio_example.cpp is non-deterministic and sometime fails #184

Open
jzmaddock opened this issue Aug 29, 2019 · 0 comments
Open

cycle_ratio_example.cpp is non-deterministic and sometime fails #184

jzmaddock opened this issue Aug 29, 2019 · 0 comments

Comments

@jzmaddock
Copy link
Contributor

We're running cycle_ratio_example.cpp in the tests, but it uses a non-deterministic random number generator which very occasionally results in the assertions failing. It's not clear if this is inevitable, or is showing up a deeper bug of some sort.

Observed failure is:

Vertices number: 1000
Edges number: 30000
Maximum cycle ratio is 9.32637
Minimum cycle ratio is -0.45058
Critical cycle:
(354,386) (386,354) 
cycle_ratio_example: libs/graph/example/cycle_ratio_example.cpp:83: int main(int, char**): Assertion `std::abs(cr.first / cr.second - min_cr) < epsilon * 2' failed.
Aborted (core dumped)

Actually looking at the result, I suspect we just need to up the error tolerance slightly - 2 epsilon might be a bit hopeful?

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