当前位置: 首页>>代码示例>>Python>>正文


Python Module.__init__方法代码示例

本文整理汇总了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())
开发者ID:mcognetta,项目名称:sage,代码行数:31,代码来源:space.py

示例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)
开发者ID:videlec,项目名称:sage-flatsurf,代码行数:9,代码来源:relative_homology.py

示例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()]
开发者ID:Alwnikrotikz,项目名称:purplesage,代码行数:30,代码来源:monoidpowerseries_module.py

示例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_()
开发者ID:mmasdeu,项目名称:btquotients,代码行数:29,代码来源:pautomorphicform.py

示例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)
开发者ID:saraedum,项目名称:OMS,代码行数:33,代码来源:space.py

示例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_()
开发者ID:williamstein,项目名称:OMS,代码行数:29,代码来源:pautomorphicform.py

示例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())
开发者ID:jjermann,项目名称:hecke_mf,代码行数:28,代码来源:space.py

示例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_()
开发者ID:mmasdeu,项目名称:darmonpoints,代码行数:15,代码来源:ocmodule.py

示例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)
开发者ID:saraedum,项目名称:sage-renamed,代码行数:21,代码来源:torsion_subgroup.py

示例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_()
开发者ID:lalitkumarj,项目名称:OMSCategory,代码行数:21,代码来源:ocmodule.py

示例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"])
开发者ID:jjermann,项目名称:jacobi_forms,代码行数:24,代码来源:jacobi_space.py

示例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())
开发者ID:drupel,项目名称:sage,代码行数:25,代码来源:space.py

示例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
开发者ID:mcognetta,项目名称:sage,代码行数:25,代码来源:finite_subgroup.py

示例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])
开发者ID:roed314,项目名称:OMS,代码行数:39,代码来源:space.py

示例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)
开发者ID:Fougeroc,项目名称:sage-flatsurf,代码行数:7,代码来源:relative_homology.py


注:本文中的sage.modules.module.Module.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。