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:  sage6.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: 
Description
This patch fixes two problems with the hyperbolicity function, one due to the decomposition into biconnected 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
Branch:  → public/18151 

comment:2 Changed 7 years ago by
Commit:  → ec323a240def550a5cb569f6c7500c2488f7c41a 

comment:3 Changed 7 years ago by
Cc:  Nathann Cohen Michele Borassi added 

Status:  new → needs_review 
comment:4 Changed 7 years ago by
Reviewers:  → Nathann Cohen 

Status:  needs_review → positive_review 
Indeed.... :P
Nathann
comment:5 Changed 7 years ago by
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 followup: 7 Changed 7 years ago by
Status:  positive_review → needs_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 Changed 7 years ago by
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
Commit:  ec323a240def550a5cb569f6c7500c2488f7c41a → 82b507edfc05fc903b01722b14008accf6f12dbf 

Branch pushed to git repo; I updated commit sha1. New commits:
82b507e  trac #18151: raise error when giving wrong parameters to cuts+

comment:9 Changed 7 years ago by
Status:  needs_work → needs_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
Status:  needs_review → positive_review 

comment:11 Changed 7 years ago by
Branch:  public/18151 → 82b507edfc05fc903b01722b14008accf6f12dbf 

Resolution:  → fixed 
Status:  positive_review → closed 
Branch pushed to git repo; I updated commit sha1. New commits:
trac #18151: fix bugs