Opened 7 years ago

Closed 7 years ago

#18151 closed defect (fixed)

Fix bug with hyperbolicity

Reported by: David Coudert Owned by:
Priority: major Milestone: sage-6.6
Component: graph theory Keywords:
Cc: Nathann Cohen, Michele Borassi Merged in:
Authors: David Coudert Reviewers: Nathann Cohen
Report Upstream: N/A Work issues:
Branch: 82b507e (Commits, GitHub, GitLab) Commit: 82b507edfc05fc903b01722b14008accf6f12dbf
Dependencies: Stopgaps:

Status badges

Description

This patch fixes two problems with the hyperbolicity function, one due to the decomposition into bi-connected components (the result was divided by two), and one due to the declaration as int of some variables.

Change History (11)

comment:1 Changed 7 years ago by David Coudert

Branch: public/18151

comment:2 Changed 7 years ago by git

Commit: ec323a240def550a5cb569f6c7500c2488f7c41a

Branch pushed to git repo; I updated commit sha1. New commits:

ec323a2trac #18151: fix bugs

comment:3 Changed 7 years ago by David Coudert

Cc: Nathann Cohen Michele Borassi added
Status: newneeds_review

comment:4 Changed 7 years ago by Nathann Cohen

Reviewers: Nathann Cohen
Status: needs_reviewpositive_review

Indeed.... :-P

Nathann

comment:5 Changed 7 years ago by Michele Borassi

Still another bug: David, if I use the algorithm 'cuts+' instead of 'cuts', with the same code I gave you and the same input, the algorithm outputs a lot of times the following lines.

The approximation_factor is ignored when using the 'cuts+' algorithm. 
The additive_gap is ignored when using the 'cuts+' algorithm.

I tried many other inputs, and it worked flawlessly. Any clue?

comment:6 Changed 7 years ago by David Coudert

Status: positive_reviewneeds_work

Right :( This is because the function calls itself and tests again the inputs. I don't know how to proceed here. Nathann: any idea?

comment:7 in reply to:  6 Changed 7 years ago by Nathann Cohen

Right :( This is because the function calls itself and tests again the inputs. I don't know how to proceed here. Nathann: any idea?

Yes -> raise an exception instead of printing a warning :-P

Nathann

comment:8 Changed 7 years ago by git

Commit: ec323a240def550a5cb569f6c7500c2488f7c41a82b507edfc05fc903b01722b14008accf6f12dbf

Branch pushed to git repo; I updated commit sha1. New commits:

82b507etrac #18151: raise error when giving wrong parameters to cuts+

comment:9 Changed 7 years ago by David Coudert

Status: needs_workneeds_review

I did so. It's the easiest way to fix the problem. I have also updated some tests.

comment:10 Changed 7 years ago by Nathann Cohen

Status: needs_reviewpositive_review

comment:11 Changed 7 years ago by Volker Braun

Branch: public/1815182b507edfc05fc903b01722b14008accf6f12dbf
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.