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

Commit

Permalink
Merge branch 'u/saraedum/ticket/15692' of git://trac.sagemath.org/sag…
Browse files Browse the repository at this point in the history
…e into ticket/15156
  • Loading branch information
saraedum committed Jun 20, 2014
2 parents 9e449c3 + 0717849 commit c0f4713
Show file tree
Hide file tree
Showing 7 changed files with 416 additions and 250 deletions.
3 changes: 1 addition & 2 deletions src/sage/combinat/root_system/ambient_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
from sage.combinat.free_module import CombinatorialFreeModule, CombinatorialFreeModuleElement
from weight_lattice_realizations import WeightLatticeRealizations
from sage.rings.all import ZZ, QQ
from sage.misc.cachefunc import ClearCacheOnPickle

class AmbientSpace(ClearCacheOnPickle, CombinatorialFreeModule):
class AmbientSpace(CombinatorialFreeModule):
r"""
Abstract class for ambient spaces
Expand Down
7 changes: 2 additions & 5 deletions src/sage/combinat/root_system/root_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from sage.misc.cachefunc import ClearCacheOnPickle, cached_method, cached_in_parent_method
from sage.misc.cachefunc import cached_method, cached_in_parent_method
from sage.rings.all import ZZ
from sage.combinat.free_module import CombinatorialFreeModule, CombinatorialFreeModuleElement
from root_lattice_realizations import RootLatticeRealizations
from sage.misc.cachefunc import cached_in_parent_method

# TODO: inheriting from ClearCacheOnPickle is a technical detail unrelated to root spaces
# could we abstract this somewhere higher?

class RootSpace(ClearCacheOnPickle, CombinatorialFreeModule):
class RootSpace(CombinatorialFreeModule):
r"""
The root space of a root system over a given base ring
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/root_system/weyl_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from sage.groups.matrix_gps.group_element import MatrixGroupElement_gap
from sage.rings.all import ZZ, QQ
from sage.interfaces.gap import gap
from sage.misc.cachefunc import cached_method, ClearCacheOnPickle
from sage.misc.cachefunc import cached_method
from sage.misc.superseded import deprecated_function_alias
from sage.combinat.root_system.cartan_type import CartanType
from sage.combinat.root_system.cartan_matrix import CartanMatrix
Expand Down Expand Up @@ -197,7 +197,7 @@ def WeylGroup(x, prefix=None):
return WeylGroup_gens(ct.root_system().root_space(), prefix=prefix)


class WeylGroup_gens(ClearCacheOnPickle, UniqueRepresentation,
class WeylGroup_gens(UniqueRepresentation,
FinitelyGeneratedMatrixGroup_gap):

@staticmethod
Expand Down
6 changes: 5 additions & 1 deletion src/sage/misc/cachefunc.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ cdef class CachedFunction(object):
cpdef get_cache(self)
cpdef clear_cache(self)
cdef object key
cdef bint pickle

cdef class CacheDict(dict):
cdef bint pickle

cdef class CachedMethod

Expand All @@ -29,5 +33,5 @@ cdef class CachedMethod(object):
cdef public str __module__
cdef CachedFunction _cachedfunc
cdef int nargs
cpdef dict _get_instance_cache(self, inst)
cpdef CacheDict _get_instance_cache(self, inst)

Loading

0 comments on commit c0f4713

Please sign in to comment.