-
-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more uses of cached_method in modular folder
- Loading branch information
Showing
6 changed files
with
30 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,7 @@ | |
from sage.arith.misc import kronecker, next_prime | ||
from sage.categories.fields import Fields | ||
from sage.matrix.matrix_space import MatrixSpace | ||
from sage.misc.cachefunc import cached_method | ||
from sage.misc.lazy_import import lazy_import | ||
from sage.modular.arithgroup.all import Gamma0 | ||
from sage.modular.hecke.module import HeckeModule_free_module | ||
|
@@ -487,6 +488,7 @@ def free_module(self): | |
""" | ||
return ZZ**self.dimension() | ||
|
||
@cached_method | ||
def dimension(self): | ||
r""" | ||
Return the dimension of the space of modular forms of weight 2 | ||
|
@@ -522,16 +524,10 @@ def dimension(self): | |
- Iftikhar Burhanuddin -- [email protected] | ||
""" | ||
try: | ||
return self.__dimension | ||
except AttributeError: | ||
pass | ||
if self.__level == 1: | ||
G = Gamma0(self.__prime) | ||
self.__dimension = G.dimension_modular_forms(2) | ||
else: | ||
raise NotImplementedError | ||
return self.__dimension | ||
return G.dimension_modular_forms(2) | ||
raise NotImplementedError | ||
|
||
rank = dimension | ||
|
||
|
@@ -607,6 +603,7 @@ def weight(self): | |
""" | ||
return 2 | ||
|
||
@cached_method | ||
def supersingular_points(self): | ||
r""" | ||
Compute the supersingular j-invariants over the | ||
|
@@ -647,10 +644,6 @@ def supersingular_points(self): | |
- Iftikhar Burhanuddin -- [email protected] | ||
""" | ||
try: | ||
return (self._ss_points_dic, self._ss_points) | ||
except AttributeError: | ||
pass | ||
Fp2 = self.__finite_field | ||
level = self.__level | ||
prime = Fp2.characteristic() | ||
|