Opened 12 years ago

Closed 12 years ago

#9420 closed enhancement (fixed)

SubgraphSearch class instead of a method, digraphs fixed

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

Status badges

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 Nathann Cohen 12 years ago.

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by Nathann Cohen

Attachment: trac_9420.patch added

comment:1 Changed 12 years ago by Nathann Cohen

Status: newneeds_review

comment:2 Changed 12 years ago by Dima Pasechnik

Status: needs_reviewpositive_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 12 years ago by Nathann Cohen

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 12 years ago by David Loeffler

Authors: Nathann Cohen
Reviewers: Dmitrii Pasechnik

comment:5 Changed 12 years ago by Mitesh Patel

Merged in: sage-4.6.alpha2
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.