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

Fig bug in graphs.RandomToleranceGraph #33628

Closed
dcoudert opened this issue Apr 2, 2022 · 8 comments
Closed

Fig bug in graphs.RandomToleranceGraph #33628

dcoudert opened this issue Apr 2, 2022 · 8 comments

Comments

@dcoudert
Copy link
Contributor

dcoudert commented Apr 2, 2022

Part of #32544:

sage -t --long --warn-long 291.5 --random-seed=184268751501867371650794470659094787547 src/sage/graphs/generators/random.py
**********************************************************************
File "src/sage/graphs/generators/random.py", line 1527, in sage.graphs.generators.random.RandomToleranceGraph
Failed example:
    g = graphs.RandomToleranceGraph(8)
Exception raised:
    Traceback (most recent call last):
      File "/Users/dcoudert/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/dcoudert/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.graphs.generators.random.RandomToleranceGraph[0]>", line 1, in <module>
        g = graphs.RandomToleranceGraph(Integer(8))
      File "/Users/dcoudert/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/graphs/generators/random.py", line 1553, in RandomToleranceGraph
        return ToleranceGraph(tolrep)
      File "/Users/dcoudert/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/graphs/generators/intersection.py", line 351, in ToleranceGraph
        raise ValueError("Invalid tolerance representation at position "+str(i)+"; third value must be positive!")
    ValueError: Invalid tolerance representation at position 2; third value must be positive!

Method graphs.ToleranceGraph raises an error when a tolerance is <= 0.

CC: @tscrim

Component: graph theory

Author: David Coudert

Branch/Commit: b4c34bb

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/33628

@dcoudert dcoudert added this to the sage-9.6 milestone Apr 2, 2022
@dcoudert
Copy link
Contributor Author

dcoudert commented Apr 2, 2022

Commit: b4c34bb

@dcoudert
Copy link
Contributor Author

dcoudert commented Apr 2, 2022

Branch: public/graphs/33628_random

@dcoudert
Copy link
Contributor Author

dcoudert commented Apr 2, 2022

New commits:

b4c34bbtrac #33628: fix bug in random tolerance graph generator

@dcoudert

This comment has been minimized.

@tscrim
Copy link
Collaborator

tscrim commented Apr 2, 2022

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Apr 2, 2022

comment:3

LGTM.

@dcoudert
Copy link
Contributor Author

dcoudert commented Apr 2, 2022

comment:4

Thank you !

@vbraun
Copy link
Member

vbraun commented Apr 3, 2022

Changed branch from public/graphs/33628_random to b4c34bb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants