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


Python PolynomialRing.gens_dict方法代码示例

本文整理汇总了Python中sage.rings.polynomial.polynomial_ring_constructor.PolynomialRing.gens_dict方法的典型用法代码示例。如果您正苦于以下问题:Python PolynomialRing.gens_dict方法的具体用法?Python PolynomialRing.gens_dict怎么用?Python PolynomialRing.gens_dict使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sage.rings.polynomial.polynomial_ring_constructor.PolynomialRing的用法示例。


在下文中一共展示了PolynomialRing.gens_dict方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Fourier_coefficients

# 需要导入模块: from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing [as 别名]
# 或者: from sage.rings.polynomial.polynomial_ring_constructor.PolynomialRing import gens_dict [as 别名]
 def Fourier_coefficients( self, det_list):
     fcs = DB.find( { 'owner_id': self.__id,
                      'data_type': 'fc',
                      'det': { '$in': [ str(d) for d in det_list]}
                      })
     P = PolynomialRing( self.__field, names = 'x,y')
     loc = P.gens_dict()
     loc.update ( self.__field.gens_dict())
     return dict( (Integer(fcd['det']),
                   dict( (tuple( eval(f)), sage_eval( fcd['data'][f], locals = loc))
                         for f in fcd['data'] ))
                  for fcd in fcs)
开发者ID:StockpotCreative,项目名称:lmfdb,代码行数:14,代码来源:sample.py

示例2: __init__

# 需要导入模块: from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing [as 别名]
# 或者: from sage.rings.polynomial.polynomial_ring_constructor.PolynomialRing import gens_dict [as 别名]
 def __init__(self, collection, name):
     dct = {'collection': collection, 'name': name}
     smple = find_sample(dct)
     assert smple, '%s: sample does not exist' % dct
     self.__collection = collection
     self.__name = name
     weight = smple.get('weight')
     field = smple.get('field')
     fcs = smple.get('Fourier_coefficients')
     evs = smple.get('eigenvalues')
     self.__weight = Integer(weight) if weight else weight
     R = PolynomialRing(IntegerRing(), name='x')
     self.__field = sage_eval(field, locals=R.gens_dict()) if field else field
     loc_f = self.__field.gens_dict()
     P = PolynomialRing(self.__field, names='x,y')
     loc = P.gens_dict()
     loc.update(loc_f)
     self.__fcs = dict((tuple(eval(f)),
                        sage_eval(fcs[f], locals=loc))
                       for f in fcs) if fcs else fcs
     loc = self.field().gens_dict()
     self.__evs = dict( (eval(l), sage_eval( evs[l], locals=loc_f)) for l in evs)\
         if evs else evs
     self.__explicit_formula = smple.get('explicit_formula')
开发者ID:WarrenMoore,项目名称:lmfdb,代码行数:26,代码来源:sample.py

示例3: __init__

# 需要导入模块: from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing [as 别名]
# 或者: from sage.rings.polynomial.polynomial_ring_constructor.PolynomialRing import gens_dict [as 别名]
    def __init__( self, doc):

        self.__collection = doc.get( 'collection')
        self.__name = doc.get( 'name')

        weight = doc.get( 'weight')
        self.__weight = sage_eval( weight) if weight else weight
       
        field = doc.get( 'field')
        R = PolynomialRing( IntegerRing(), name = 'x')
        self.__field = sage_eval( field, locals = R.gens_dict()) if field else field

        self.__explicit_formula = doc.get( 'explicit_formula')
        self.__type = doc.get( 'type')
        self.__is_eigenform = doc.get( 'is_eigenform')
        self.__is_integral = doc.get( 'is_integral')
        self.__representation = doc.get( 'representation')
        self.__id = doc.get( '_id')
开发者ID:StockpotCreative,项目名称:lmfdb,代码行数:20,代码来源:sample.py


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