This is a little silly,
sage: any(v == x for x in d.breadth_first_search(d.neighbors_out(v)))
as
sage: v in d.breadth_first_search(d.neighbors_out(v))
is equivalent, easier to read, and a tiny bit faster.
On Mon, Jun 22, 2015 at 4:32 AM, Nathann Cohen wrote:
>> Probably that won't be needed.
I implemented something similar for permutations 'cause I needed it:
http://hg.sagemath.org/sage-main/src/f0ee3538887fe739601babb54e177ec5e1133b7a/sage/combinat/permutation_cython.pyx?at=default
On Wed, Dec 4, 2013 at 1:52 PM, Nathann Cohen wrote:
> Helloo everybody !
>
> I got an email from
I typically draw them top-to-bottom. I've seen them called "string
diagrams" by people in pattern avoidance.
On Tue, Apr 24, 2012 at 8:24 AM, Nathann Cohen wrote:
> Helloo everybody !!!
>
> Because of a former post on this google group [1] I created the following
> patch [2]. It adds to Perm
Yes, this was suggested to me after I'd abandoned the catalog I
posted. I'm fairly sure that most, if not all of my bijections follow
directly from the recursive structure of Catalan objects.
On Mon, Mar 26, 2012 at 10:25 AM, matthew Drescher wrote:
> i would be interested. I had it in mind to f
Christian, this is far from standard. It's fairly discombobulated
scratch work. The objects aren't even classes.
If you look for the cell that starts out:
CatCat = CatalanCatalog()
CatCat.add_type('c','binary tree',...
and execute that, then things should work better for you. The
relevant cel
Darn, that's a bug in the notebook. Let's see if a less-busy server
is less afflicted.
http://flask.sagenb.org/home/pub/101/
If this fails, I'll attach the worksheet.
On Sun, Mar 25, 2012 at 1:06 PM, Christian Stump
wrote:
>> balanced parentheses
>> dyck paths
>> coin stacks
>> noncrossing m
I actually started a project like this a while back. I made a catalog
which accepts generators and mappings, and constructs mappings between
objects types you've connected. It does some plotting, too.
One weird thing about it is that I use the labels from Richard
Stanley's catalog of objects.
b
I'm seriously interested in cythonizing generators. If there's
funding, I'd be delighted to come and hack for a week.
On Thu, Nov 24, 2011 at 8:08 AM, Vincent Delecroix
<20100.delecr...@gmail.com> wrote:
> 2011/11/24 Florent Hivert :
>>
>> I'm thinking about organizing a small one-week coding sp
Bruce,
Please keep posting here; or at the very least, copy me on the
conversation. I'm curious how your "ribbon graphs" differ from
orientable maps. I implemented Graph.genus(), which enumerates
"rotation systems" which represent a given graph embedded on an
orientable surface.
To me, a rotati
A "plane tree" is a tree with an embedding into the plane.
A "planar tree" is a tree which can be embedded in the plane. Every
tree is planar, so this term is offensive and redundant.
Please don't put "planar tree" anywhere in Sage.
On Sun, Sep 11, 2011 at 5:37 AM, Vincent Delecroix
<20100.dele
On Fri, Apr 8, 2011 at 10:27 AM, Jason B Hill wrote:
> The only real exception I see to accessibility of the theory is in the
> partition backtrack algorithms themselves. Those simply need to be
> written in a language that is appropriate for consumption. As far as I
> know, nobody has really don
On Thu, Apr 7, 2011 at 4:37 PM, Christian Stump
wrote:
> - is there a Sage implementation of permutation groups, or only the
> gap implementation (it takes very long to go through the elements of a
> permutation group, even in small examples)?
Christian,
Robert Miller has been hard at work impl
Hello all,
I'm currently taking a course on graph limits, and we've recently been
discussing the algebra of quantum graphs. Some of this stuff is too
incredible not to implement, so I knocked something together, and I've
been playing with it for the past few days. What I'm writing is pure
Python
Weak compositions may have zeros; I think it'd be natural to call this
a weak partition.
On Thu, Mar 10, 2011 at 7:57 AM, Florent Hivert
wrote:
> Hi there,
>
> I'm currently playing with a slight generalization of the notion of
> partition. They correspond to Ferrer's diagram with possible e
Here are a few problems I've solved with exact cover:
2D knapsack problem: http://sagenb.org/home/pub/2365/
graph coloring:
http://hg.sagemath.org/sage-main/file/5b338f2e484f/sage/graphs/graph_coloring.py#l1
finding matchings in graphs
finding cycle coverings of graphs
finding short programs to co
I've been working on a new implementation of an algorithm to compute
the genus of graphs. Throughout the process, I've been bound by the
chains of backwards compatibility. As I've attempted to finish off
the patch, I've found some deeply unsettling details in the current
implementation. I'd like
Nicolas (et al),
Thanks for your comments! Unfortunately, you replied minutes after I
put up a new patch. The class (which I named PermutationEnumerator
because nobody else had piped up) is purely for reference, and I don't
actually see any other benefit to including it: it duplicates
functional
> I must confess that I wasn't really convinced by my suggestion of using
... Again, I don't like this
> name but I'm arguing that I even more dislike plain_changer.
Fair enough, and well argued. I believe Knuth uses the term "plain
change" because of the historic motivation -- I find the traditi
> I've seen it and started to comment. The main concern I have is the
> name. Please see my comments there.
Great. I rather disagree with your suggestion, but am open to
persuasion. What do you suggest I call it? Knuth does attribute the
algorithm to Trotter... but the name Steinhaus-Johnson-Tr
> It definitely should be in sage.combinat.permutations. I am not sure
> where exactly though. Maybe just as a non exported function like
>
> def cyclic_permutation_iterator(n)
>
> for the moment, and we will see later how and where to wrap and
> advertise it depending on other applications.
I just re-implemented an algorithm to compute a graph's genus in
Cython to replace the Python version we've got. The algorithm
involves iterating over all cyclic permutations of a finite set. Due
to other details of the algorithm, there's a huge benefit to be gained
by enumerating the cyclic perm
21 matches
Mail list logo