Opened 9 years ago

Closed 9 years ago

#9420 closed enhancement (fixed)

SubgraphSearch class instead of a method, digraphs fixed

Reported by: ncohen Owned by: jason, ncohen, rlm
Priority: major Milestone: sage-4.6
Component: graph theory Keywords:
Cc: rlm Merged in: sage-4.6.alpha2
Authors: Nathann Cohen Reviewers: Dmitrii Pasechnik
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

Hello !!

This patch implements the class SubgraphSearch?, which enables one to look for copies of a small graph in a larger one, which is exactly what the method subgraph_search previously did (#8922).

The code is simply inserted inside a new class, with a few other methods to iterate over the occurences, or to count them !

This could have been done with a simple "yield" in Cython, though we may not want to wait until they are implemented ;-)

Nathann

Attachments (1)

trac_9420.patch (31.3 KB) - added by ncohen 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by ncohen

comment:1 Changed 9 years ago by ncohen

  • Status changed from new to needs_review

comment:2 Changed 9 years ago by dimpase

  • Status changed from needs_review to positive_review

OK, tested on Debian Linux amd64, and on MacOSX PPC with gcc4.2. The change seems to be more ideological than adding more functionality/bugfixing. It would be nice if someone more versed in Sage had a look, whether this is not something alien ideologically...

comment:3 Changed 9 years ago by ncohen

indeed... and most importantly, it may have consisted in replacing "return" by "yield", if only those were available in Cython :-p

Nathann

comment:4 Changed 9 years ago by davidloeffler

  • Authors set to Nathann Cohen
  • Reviewers set to Dmitrii Pasechnik

comment:5 Changed 9 years ago by mpatel

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