-
-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Depth/Breadth improvement for SearchForest #8288
Comments
comment:1
One more time, my english is still bad... Feel free to point and thus, make my english increasing.... |
comment:2
Hello !! I know nothing about the file sage/combinat/backtrack.py, and I intend to read it as soon as possible but I saw on TRAC the same of this patch, and I was convinced it woukd be using the Graph library : in sage/graphs/base/c_graph.pyx are written iterators for depth/breadth-first-search in general graphs.. Wouldn't it be better for this class to use such functions, are they are written in Cython and should be more efficient ? Or directly use the Graph structure, as it would automatically call these functions.. :-) Nathann |
comment:3
Nathann, using the code the graphs code is not appropriate here as that would require the entire search tree to be created/known beforehand. |
comment:4
while it is not... Ok, I got it, then you can forget what I said :-) |
This comment has been minimized.
This comment has been minimized.
comment:6
As discussed with Nicolas on irc. the patch needs some cleanup. |
comment:8
Discussed on trac: there is an algorithmic problem:
Do you have an easy father function for this tree ?
raise a
|
Attachment: search_forest_depth_and_breath_improvement-nb.patch.gz One more time, my english is still bad... Feel free to point them and thus, make my english increasing.... |
Attachment: trac_8288-reviewer.patch.gz |
Author: Nicolas Borie |
Reviewer: Florent Hivert, Minh Van Nguyen |
comment:10
Don't use the keyword "method" to specify the algorithm to be used. Instead use "algorithm". See #6094 and #7971 for two attempts to get rid of using "method" for specifying the algorithm to be used. My reviewer patch makes this change to your implementation. For any argument that can take more than one value, provide all the possible values. For example, if possible, list all the possible values for the argument "algorithm". There is a slight bug in the method
To remedy this bug, we could explicitly test for "breadth" and "depth" and set the value There is a slight bug in the method
But then, we could assign the keyword
One way to fix this is to make Other general remarks:
I have provided a reviewer patch that implements some changes on top of nborie's patch. Someone needs to review the technical aspect of the features implemented by nborie's patch. |
This comment has been minimized.
This comment has been minimized.
comment:11
Hi Nicolas, I'm currently using search forest and I run into some troubles... I also want
Thanks for all this ! I'm using it... Florent |
This comment has been minimized.
This comment has been minimized.
comment:12
I upload a patch for this ticket to be discussed on http://groups.google.com/group/sage-combinat-devel/browse_thread/thread/fbedf039a549c68b Thanks for your comments Florent. Nicolas. |
comment:14
Replying to @sagetrac-nborie: Some more remarks: please check your sphinx markup:
|
comment:15
the last trac_8288_search_forest_depth_and_breath_improvement-nb.patch is ready from my side... |
comment:16
rebased for 4.5.1 |
comment:17
I put a patch up with some minor changes on the patch server. Do you want to fold them into your patch. Florent, what is the status of this ticket? |
This comment has been minimized.
This comment has been minimized.
comment:18
Thanks Mike for yours changes. I folded your patch in mine and uploaded it to the trac. I also just checked (one more time) it apply well on 4.6, that all the tests pass and the doc seems fine to me (accordingly I am a bad English language reviewer). It will be fine to finalize this work... (Was this point in your TODO list Nicolas ?) |
comment:19
Yes: we should just take 1/2 hour shortly to finalize this together. |
This comment has been minimized.
This comment has been minimized.
comment:21
Sorry for this post but with some hope that the buildbot take in care : apply trac_8288_search_forest_depth_and_breath_improvement-nb.patch |
comment:22
Hi Nicolas, I just made a couple minor improvements to the documentation on the sage-combinat patch server (directly in your patch). Please have a quick look, upload the new version to trac, and set a positive review on my behalf if you agree with my changes. Cheers, |
Changed reviewer from Florent Hivert, Minh Van Nguyen to Florent Hivert, Minh Van Nguyen, Nicolas M. Thiéry |
comment:23
It is ok with your changes. Let it go in! |
comment:24
Oh my GOD This ticket is reviewed !! Well done Nathann |
Merged: sage-4.7.alpha4 |
The goal of this patch is to include breadth enumeration method for SearchForest, categorify SearchForest and make it very simple for inherit from it.
Add an example of Parent which inherit from SearchForest should be also fine.
Note to the buildbot / release manager:
apply trac_8288_search_forest_depth_and_breath_improvement-nb.patch
CC: @sagetrac-sage-combinat @nthiery
Component: combinatorics
Keywords: enumeration depth breadth forest children
Author: Nicolas Borie
Reviewer: Florent Hivert, Minh Van Nguyen, Nicolas M. Thiéry
Merged: sage-4.7.alpha4
Issue created by migration from https://trac.sagemath.org/ticket/8288
The text was updated successfully, but these errors were encountered: