diff --git a/cgt/distances.py b/cgt/distances.py index 6811ba8..3f78da0 100644 --- a/cgt/distances.py +++ b/cgt/distances.py @@ -7,7 +7,6 @@ import networkx as nx from sage.all import ComplexDoubleField, UniversalCyclotomicField, matrix, Matrix, real, exp, round, CC from scipy.optimize import minimize_scalar -from functools import cache def mles(framework, model, genome_instances): """Return maximum likelihood estimates for a set of genome instances under the given model and framework""" diff --git a/cgt/models.py b/cgt/models.py index 18d4e8c..010d8bc 100644 --- a/cgt/models.py +++ b/cgt/models.py @@ -4,7 +4,6 @@ from sage.all_cmdline import QQ from .enums import * from . import rearrangements -from functools import cache class Model: """Defines a model. A model consists of some collection of permutations and a map from these permutations to probabilities [0,1]""" @@ -54,12 +53,10 @@ def named_model_with_relative_probs(cls, framework, named_model_dictionary): model.names += list(named_model_dictionary.keys()) return model - @cache def reg_rep_of_zs(self): """Return the regular representation of zs as comptued by PositionParadigmFramework.reg_rep_zs, but store the sparse result""" return self.framework.reg_rep_of_zs(self, sparse=True) - @cache def s_element(self, in_algebra=ALGEBRA.genome): if in_algebra not in {ALGEBRA.group, ALGEBRA.genome}: raise NotImplementedError(f"Model element for {str(in_algebra)} algebra not yet implemented") diff --git a/cgt/position_paradigm.py b/cgt/position_paradigm.py index 6392310..0259975 100644 --- a/cgt/position_paradigm.py +++ b/cgt/position_paradigm.py @@ -13,7 +13,6 @@ from .structures import HyperoctahedralGroup from scipy.sparse import dok_matrix as dok from random import choice -from functools import cache class PositionParadigmFramework: """Everything you need for working with genomes under the position paradigm""" @@ -86,7 +85,6 @@ def one_row(self, element, as_list=False): row = Permutations(self.n)(row) return row - @cache def genome_group(self): """Return the permutation group containing genome instances.""" if self.oriented: @@ -125,7 +123,6 @@ def random_genome(self, format=FORMAT.formal_sum): """Return a random genome""" return self.genome(self.random_instance(), format=format) - @cache def symmetry_group(self): """Return the symmetry group of the genomes.""" if self.symmetry == SYMMETRY.circular: @@ -136,7 +133,6 @@ def symmetry_group(self): gens = [self.genome_group().one()] return self.genome_group().subgroup(gens) - @cache def group_algebra(self): """Return the group alegbra, where the group is the group containing genome instances.""" return self.genome_group().algebra(QQ) @@ -342,7 +338,6 @@ def irreps(self, element=None): else: return representations - @cache def _cached_irreps(self): representations = [] def irrep_function_factory(irrep, signed):