本文整理汇总了Python中sage.modules.module.Module.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Module.__init__方法的具体用法?Python Module.__init__怎么用?Python Module.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.modules.module.Module
的用法示例。
在下文中一共展示了Module.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self, group, base_ring, k, ep, n):
r"""
Return the Module of (Hecke) cusp forms
of weight ``k`` with multiplier ``ep`` for the given ``group`` and ``base_ring``.
EXAMPLES::
sage: from sage.modular.modform_hecketriangle.space import CuspForms
sage: MF = CuspForms(6, ZZ, 6, 1)
sage: MF
CuspForms(n=6, k=6, ep=1) over Integer Ring
sage: MF.analytic_type()
cuspidal
sage: MF.category()
Category of modules over Integer Ring
sage: MF in MF.category()
True
sage: MF.module()
Vector space of dimension 1 over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
sage: MF.ambient_module() == MF.module()
True
sage: MF.is_ambient()
True
"""
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep, n=n)
Module.__init__(self, base=base_ring)
self._analytic_type=self.AT(["cusp"])
self._module = FreeModule(self.coeff_ring(), self.dimension())
示例2: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self, surface, base_ring=ZZ):
self._base_ring=base_ring
if not isinstance(surface,SimilaritySurface):
raise ValueError("RelativeHomology only defined for SimilaritySurfaces (and better).")
self._s=surface
self._cached_edges=dict()
Module.__init__(self, base_ring)
示例3: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self, O, C, R) :
"""
INPUT:
- `O` -- A monoid with an action of a group; As implemented in
:class:~`fourier_expansion_framework.monoidpowerseries.NNMonoid`.
- `C` -- A monoid of characters; As implemented in ::class:~`fourier_expansion_framework.monoidpowerseries.CharacterMonoid_class`.
- `R` -- A representation on a module; As implemented
in :class:~`fourier_expansion_framework.monoidpowerseries.TrivialRepresentation`.
EXAMPLES::
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_module import EquivariantMonoidPowerSeriesModule
sage: emps = EquivariantMonoidPowerSeriesModule_generic(NNMonoid(True), TrivialCharacterMonoid("1", QQ), TrivialRepresentation("1", FreeModule(QQ, 2))) # indirect doctest
"""
# If the representation O respects the monoid structure of S
# the base ring should be the associated power series ring.
if O.is_monoid_action() :
Module.__init__(self, EquivariantMonoidPowerSeriesRing(O,C,TrivialRepresentation(R.group(), R.base_ring())))
else :
Module.__init__(self, R.codomain())
EquivariantMonoidPowerSeriesAmbient_abstract.__init__(self, O, C, R)
self.__coeff_gens = \
[self._element_class( self,
dict([( C.one_element(), dict([(self.monoid().zero_element(), a)]) )]),
self.monoid().filter_all() )
for a in self.coefficient_domain().gens()]
示例4: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self,domain,U,prec = None,t = None,R = None,overconvergent = False):
if(R is None):
if not isinstance(U,Integer):
self._R = U.base_ring()
else:
if prec is None:
prec = 20
self._R = Qp(domain._p,prec)
else:
self._R = R
#U is a CoefficientModuleSpace
if isinstance(U,Integer):
if t is None:
if overconvergent:
t = prec-U+1
else:
t = 0
self._U = OCVn(U-2,self._R,U-1+t)
else:
self._U = U
self._source = domain
self._list = self._source.get_list() # Contains also the opposite edges
self._prec = self._R.precision_cap()
self._n = self._U.weight()
self._p = self._source._p
Module.__init__(self,base = self._R)
self._populate_coercion_lists_()
示例5: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self, group, coefficients, sign=0):
r"""
INPUT:
See :class:`PSModularSymbolSpace`
EXAMPLES::
sage: D = Distributions(2, 11)
sage: M = PSModularSymbols(Gamma0(2), coefficients=D)
sage: type(M)
<class 'sage.modular.pollack_stevens.space.PSModularSymbolSpace_with_category'>
sage: TestSuite(M).run()
"""
Module.__init__(self, coefficients.base_ring())
if sign not in [0,-1,1]:
# sign must be be 0, -1 or 1
raise ValueError, "sign must be 0, -1, or 1"
self._group = group
self._coefficients = coefficients
if coefficients.is_symk():
self.Element = PSModularSymbolElement_symk
else:
self.Element = PSModularSymbolElement_dist
self._sign = sign
# should distingish between Gamma0 and Gamma1...
self._source = ManinRelations(group.level())
# We have to include the first action so that scaling by Z doesn't try to pass through matrices
actions = [PSModSymAction(ZZ, self), PSModSymAction(M2ZSpace, self)]
self._populate_coercion_lists_(action_list=actions)
示例6: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self,X,U,prec=None,t=None,R=None,overconvergent=False):
if(R is None):
if(not isinstance(U,Integer)):
self._R=U.base_ring()
else:
if(prec is None):
prec=100
self._R=Qp(X._p,prec)
else:
self._R=R
#U is a CoefficientModuleSpace
if(isinstance(U,Integer)):
if(t is None):
if(overconvergent):
t=prec-U+1
else:
t=0
self._U=OCVn(U-2,self._R,U-1+t)
else:
self._U=U
self._X=X
self._V=self._X.get_vertex_list()
self._E=self._X.get_edge_list()
self._prec=self._R.precision_cap()
self._n=self._U.weight()
Module.__init__(self,base=self._R)
self._populate_coercion_lists_()
示例7: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self, group, base_ring, k, ep):
r"""
Return the Module of (Hecke) modular forms
of weight ``k`` with multiplier ``ep`` for the given ``group`` and ``base_ring``.
EXAMPLES::
sage: MF = ModularForms()
sage: MF
ModularForms(n=3, k=0, ep=1) over Integer Ring
sage: MF.analytic_type()
modular
sage: MF.category()
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
sage: MF.module()
Vector space of dimension 1 over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
sage: MF.ambient_module() == MF.module()
True
sage: MF.is_ambient()
True
"""
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep)
Module.__init__(self, base=self.coeff_ring())
self._analytic_type = self.AT(["holo"])
self._module = FreeModule(self.coeff_ring(), self.dimension())
示例8: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self,p,depth):
Module.__init__(self,base = ZZ)
self._R = ZZ
self._p = p
self._Rmod = ZpCA(p,depth - 1)
self._depth = depth
self._pN = self._p**(depth - 1)
self._PowerSeries = PowerSeriesRing(self._Rmod, default_prec = self._depth,name='z')
self._cache_powers = dict()
self._unset_coercions_used()
self._Sigma0 = Sigma0(self._p, base_ring = self._Rmod, adjuster = our_adjuster())
self.register_action(Sigma0Action(self._Sigma0,self))
self._populate_coercion_lists_()
示例9: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self, abvar):
"""
Group of all torsion points over the algebraic closure on an
abelian variety.
INPUT:
- ``abvar`` - an abelian variety
EXAMPLES::
sage: A = J0(23)
sage: A.qbar_torsion_subgroup()
Group of all torsion points in QQbar on Abelian variety J0(23) of dimension 2
"""
self.__abvar = abvar
Module.__init__(self, ZZ)
示例10: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self,n,R,depth=None,basis=None):
Module.__init__(self,base=R)
if basis is not None:
self._basis=copy(basis)
self._n=n
self._R=R
if R.is_exact():
self._Rmod=self._R
else:
self._Rmod=Zmod(self._R.prime()**(self._R.precision_cap()))
if depth is None:
depth=n+1
if depth != n+1:
if R.is_exact(): raise ValueError, "Trying to construct an over-convergent module with exact coefficients, how do you store p-adics ??"
self._depth=depth
self._PowerSeries=PowerSeriesRing(self._Rmod,default_prec=self._depth,name='z')
self._powers=dict()
self._populate_coercion_lists_()
示例11: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self, group, base_ring, k, ep, n):
r"""
Return the Module of (Hecke) meromorphic modular forms
of weight ``k`` with multiplier ``ep`` for the given ``group`` and ``base_ring``.
EXAMPLES::
sage: from sage.modular.modform_hecketriangle.space import MeromorphicModularForms
sage: MF = MeromorphicModularForms()
sage: MF
MeromorphicModularForms(n=3, k=0, ep=1) over Integer Ring
sage: MF.analytic_type()
meromorphic modular
sage: MF.category()
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
sage: MF.is_ambient()
True
"""
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep, n=n)
Module.__init__(self, base=self.coeff_ring())
self._analytic_type=self.AT(["jacobi", "mero"])
示例12: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self, group, base_ring, k, ep, n):
r"""
Return the Module of (Hecke) quasi modular forms
of weight ``k`` with multiplier ``ep`` for the given ``group`` and ``base_ring``.
EXAMPLES::
sage: from sage.modular.modform_hecketriangle.space import QuasiModularForms
sage: MF = QuasiModularForms(5, ZZ, 20/3, 1)
sage: MF
QuasiModularForms(n=5, k=20/3, ep=1) over Integer Ring
sage: MF.analytic_type()
quasi modular
sage: MF.category()
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
sage: MF.is_ambient()
True
"""
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep, n=n)
Module.__init__(self, base=self.coeff_ring())
self._analytic_type=self.AT(["quasi", "holo"])
self._module = FreeModule(self.coeff_ring(), self.dimension())
示例13: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self, abvar, field_of_definition=QQ):
"""
Initialize ``self``.
TESTS::
sage: A = J0(11)
sage: G = A.torsion_subgroup(2)
sage: TestSuite(G).run() # long time
"""
from sage.categories.category import Category
from sage.categories.fields import Fields
from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets
from sage.categories.modules import Modules
from .abvar import is_ModularAbelianVariety
if field_of_definition not in Fields():
raise TypeError("field_of_definition must be a field")
if not is_ModularAbelianVariety(abvar):
raise TypeError("abvar must be a modular abelian variety")
category = Category.join((Modules(ZZ), FiniteEnumeratedSets()))
Module.__init__(self, ZZ, category=category)
self.__abvar = abvar
self.__field_of_definition = field_of_definition
示例14: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self, group, coefficients, sign=0):
r"""
INPUT:
See :class:`PSModularSymbolSpace`
EXAMPLES::
sage: D = Distributions(2, 11)
sage: M = PSModularSymbols(Gamma0(11), coefficients=D)
sage: type(M)
<class 'sage.modular.pollack_stevens.space.PSModularSymbolSpace_with_category'>
sage: TestSuite(M).run()
"""
Module.__init__(self, coefficients.base_ring())
if sign not in [0,-1,1]:
# sign must be be 0, -1 or 1
raise ValueError, "sign must be 0, -1, or 1"
self._group = group
self._coefficients = coefficients
if coefficients.is_symk():
self.Element = PSModularSymbolElement_symk
else:
self.Element = PSModularSymbolElement_dist
self._sign = sign
# should distingish between Gamma0 and Gamma1...
self._source = ManinRelations(group.level())
# Register the action of 2x2 matrices on self.
if coefficients.is_symk():
action = PSModSymAction(Sigma0(1), self)
else:
action = PSModSymAction(Sigma0(self.prime()), self)
self._populate_coercion_lists_(action_list=[action])
示例15: __init__
# 需要导入模块: from sage.modules.module import Module [as 别名]
# 或者: from sage.modules.module.Module import __init__ [as 别名]
def __init__(self, surface, base_ring=ZZ):
self._base_ring=base_ring
self._s=surface
self._cached_edges=dict()
Module.__init__(self, base_ring)