Opened 10 years ago

Closed 9 years ago

#9581 closed defect (fixed)

edge_incident bug in generic_graph.py

Reported by: vdelecroix Owned by: vdelecroix
Priority: major Milestone: sage-4.6.1
Component: graph theory Keywords: graph
Cc: ncohen, rmiller Merged in: sage-4.6.1.alpha0
Authors: Vincent Delecroix Reviewers: Nathann Cohen
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by ncohen)

Currently, the edge_incident method of generic graph calls edge_boundary which first take a lot of time and secondly does not work

sage: G = Graph(loops=True)
sage: G.add_edge(0,0)
sage: G.edges()
[(0, 0, None)]
sage: list(G.edge_iterator(0))
[(0, 0, None)]
sage: G.edges_incident(0)
[]

The ticket also aims to reduce multiple calls (edge_boundary does not call directly edge_iterator as it should).

It is also the occasion to add some doc and correct some typos.

Apply first :

Attachments (3)

trac_9581-fix.patch (715 bytes) - added by ncohen 10 years ago.
trac_9581-edge_incident.patch (10.0 KB) - added by vdelecroix 9 years ago.
apply only this patch which takes care of Nathan remark
trac_9581-edge_incident.2.patch (7.8 KB) - added by vdelecroix 9 years ago.
rebased version (apply only this one)

Download all attachments as: .zip

Change History (15)

comment:1 Changed 10 years ago by vdelecroix

  • Description modified (diff)

comment:2 Changed 10 years ago by ncohen

  • Status changed from new to needs_review

Excellent ! Thank youuuuuuuuuuuuuu !!

Your patch is very nice, applies fine and everything.. I would just like to append a short line, because of a missing "if". If you agree with this, let's say this ticket is positively reviewed ! :-)

Nathann

Changed 10 years ago by ncohen

comment:3 Changed 10 years ago by vdelecroix

Nathan, Why did you put this ticket as needs_review? It seems to be important to be a lot more explicit in the definition of each function of generic_graph and implement all the cases in examples... perhaps it is the matter of another ticket...

comment:4 Changed 10 years ago by ncohen

  • Status changed from needs_review to needs_work

Hello ! Well, if you think it needs more documenation or tests, this ticket certainly is the one that should contain it... I thought the behaviour of these functions did not change that much, only "internal modifications", so... But I'm sorry for this, all you just said is better done here ! :-)

Changed 9 years ago by vdelecroix

apply only this patch which takes care of Nathan remark

comment:5 Changed 9 years ago by vdelecroix

  • Status changed from needs_work to needs_review

comment:6 Changed 9 years ago by ncohen

  • Status changed from needs_review to needs_work

Hello !!! I can not apply this patch on 4.6.alpha3, looks like it needs to be rebased ^^;

Nathann

Changed 9 years ago by vdelecroix

rebased version (apply only this one)

comment:7 Changed 9 years ago by vdelecroix

  • Status changed from needs_work to needs_review

comment:8 Changed 9 years ago by ncohen

  • Status changed from needs_review to positive_review

Positive review to this rebased version :-)

Nathann

comment:9 Changed 9 years ago by ncohen

  • Description modified (diff)

comment:10 Changed 9 years ago by jdemeyer

  • Milestone changed from sage-4.6 to sage-4.6.1

comment:11 Changed 9 years ago by jdemeyer

  • Authors changed from vdelecroix to Vincent Delecroix
  • Reviewers set to Nathann Cohen

comment:12 Changed 9 years ago by jdemeyer

  • Merged in set to sage-4.6.1.alpha0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.