Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac #11529 tests seem to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed Apr 21, 2014
1 parent 5a15e07 commit 5849b28
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
18 changes: 10 additions & 8 deletions src/sage/combinat/ordered_tree.py
Expand Up @@ -22,6 +22,13 @@
from sage.combinat.abstract_tree import (AbstractClonableTree,
AbstractLabelledClonableTree)
from sage.combinat.combinatorial_map import combinatorial_map
from sage.misc.cachefunc import cached_method
from sage.categories.sets_cat import Sets, EmptySetError
from sage.rings.integer import Integer
from sage.sets.non_negative_integers import NonNegativeIntegers
from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets
from sage.sets.family import Family
from sage.misc.cachefunc import cached_method


class OrderedTree(AbstractClonableTree, ClonableList):
Expand Down Expand Up @@ -512,8 +519,8 @@ def left_right_symmetry(self):
return OrderedTree(children)

import sage.combinat.ranker
from sage.misc.cachefunc import cached_method
_cayley_ranker = sage.combinat.ranker.on_fly()

@cached_method
def cayley_normalize(self):
"""
Expand Down Expand Up @@ -546,12 +553,6 @@ def cayley_normalize_in_place(self):
resl[i] = resl[i].cayley_normalized()
resl.sort(key = rank)

from sage.categories.sets_cat import Sets, EmptySetError
from sage.rings.integer import Integer
from sage.sets.non_negative_integers import NonNegativeIntegers
from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets
from sage.sets.family import Family
from sage.misc.cachefunc import cached_method

# Abstract class to serve as a Factory no instance are created.
class OrderedTrees(UniqueRepresentation, Parent):
Expand Down Expand Up @@ -623,6 +624,7 @@ def leaf(self):
"""
return self([])


class OrderedTrees_all(DisjointUnionEnumeratedSets, OrderedTrees):
"""
The set of all ordered trees.
Expand Down Expand Up @@ -694,7 +696,7 @@ def unlabelled_trees(self):

def labelled_trees(self):
"""
Return the set of unlabelled trees associated to ``self``
Return the set of labelled trees associated to ``self``
EXAMPLES::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/rooted_tree.py
Expand Up @@ -300,7 +300,7 @@ def __init__(self, policy=RootedTrees._default_policy):
sage: TestSuite(RootedTrees()).run()
"""
factories.ParentWithSetFactory.__init__(self, (), policy,
category=InfiniteEnumeratedSets())
category=InfiniteEnumeratedSets())
DisjointUnionEnumeratedSets.__init__(
self, Family(NonNegativeIntegers(), self._of_size),
facade=True, keepkey=False,
Expand Down Expand Up @@ -407,7 +407,7 @@ def __init__(self, n, policy):
"""
self._n = n
factories.ParentWithSetFactory.__init__(self, (n,), policy,
category=FiniteEnumeratedSets())
category=FiniteEnumeratedSets())

def _repr_(self):
r"""
Expand Down

0 comments on commit 5849b28

Please sign in to comment.