本文整理汇总了Python中sage.structure.parent_base.ParentWithBase类的典型用法代码示例。如果您正苦于以下问题:Python ParentWithBase类的具体用法?Python ParentWithBase怎么用?Python ParentWithBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ParentWithBase类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, name):
self.__name = name
self.__coerce_name = '_' + name.lower() + '_'
self.__seq = -1
self._available_vars = []
self._seed = None
ParentWithBase.__init__(self, self)
开发者ID:robertwb,项目名称:sage,代码行数:7,代码来源:interface.py
示例2: __init__
def __init__(self, number_field):
"""
See ``NFCusps`` for full documentation.
EXAMPLES::
sage: k.<a> = NumberField(x^3 + x^2 + 13)
sage: kCusps = NFCusps(k); kCusps
Set of all cusps of Number Field in a with defining polynomial x^3 + x^2 + 13
"""
self.__number_field = number_field
ParentWithBase.__init__(self, self)
开发者ID:chiragsinghal283,项目名称:sage,代码行数:12,代码来源:cusps_nf.py
示例3: __init__
def __init__(self):
r"""
The set of cusps, i.e. `\mathbb{P}^1(\QQ)`.
EXAMPLES::
sage: C = sage.modular.cusps.Cusps_class() ; C
Set P^1(QQ) of all cusps
sage: Cusps == C
True
"""
ParentWithBase.__init__(self, self)
开发者ID:CETHop,项目名称:sage,代码行数:12,代码来源:cusps.py
示例4: __init__
def __init__(self, base_ring):
"""
INPUT:
- ``R`` -- a ring (default: ZZ).
EXAMPLES::
sage: FormalSums(ZZ)
Abelian Group of all Formal Finite Sums over Integer Ring
sage: FormalSums(GF(7))
Abelian Group of all Formal Finite Sums over Finite Field of size 7
"""
ParentWithBase.__init__(self, base_ring)
开发者ID:CETHop,项目名称:sage,代码行数:14,代码来源:formal_sum.py
示例5: __init__
def __init__(self, p, base_ring):
r"""
Initialisation function.
EXAMPLE::
sage: pAdicWeightSpace(17)
Space of 17-adic weight-characters defined over '17-adic Field with capped relative precision 20'
"""
ParentWithBase.__init__(self, base=base_ring)
p = ZZ(p)
if not p.is_prime():
raise ValueError, "p must be prime"
self._p = p
self._param = Qp(p)((p == 2 and 5) or (p + 1))
开发者ID:bgxcpku,项目名称:sagelib,代码行数:15,代码来源:weightspace.py
示例6: __init__
def __init__(self, arguments):
"""
EXAMPLES:
We verify that coercion works in the case where ``x`` is not an
instance of SymbolicExpression, but its parent is still the
SymbolicRing::
sage: f(x) = 1
sage: f*e
x |--> e
"""
self._arguments = arguments
ParentWithBase.__init__(self, SR)
self._populate_coercion_lists_(coerce_list=[SR])
self.symbols = SR.symbols # Use the same list of symbols as SR
开发者ID:ProgVal,项目名称:sage,代码行数:16,代码来源:callable.py
示例7: __getattr__
def __getattr__(self, attrname):
"""
TESTS::
sage: ParentWithBase.__getattribute__(singular, '_coerce_map_from_')
<built-in method _coerce_map_from_ of Singular object at ...>
"""
try:
return ParentWithBase.__getattribute__(self, attrname)
except AttributeError:
if attrname[:1] == "_":
raise AttributeError
return self._function_class()(self, attrname)
开发者ID:bgxcpku,项目名称:sagelib,代码行数:13,代码来源:interface.py
示例8: __init__
def __init__(self, name):
"""
Initialize ``self``.
EXAMPLES::
sage: Maxima() == maxima
False
sage: maxima == maxima
True
sage: Maxima() != maxima
True
sage: maxima != maxima
False
"""
self.__name = name
self.__coerce_name = '_' + name.lower() + '_'
self.__seq = -1
self._available_vars = []
self._seed = None
ParentWithBase.__init__(self, self)
开发者ID:saraedum,项目名称:sage-renamed,代码行数:22,代码来源:interface.py
示例9: __init__
def __init__(self, X, RR):
if not is_ProbabilitySpace(X):
raise TypeError, "Argument X (= %s) must be a probability space" % X
ParentWithBase.__init__(self, X)
self._codomain = RR
开发者ID:bgxcpku,项目名称:sagelib,代码行数:5,代码来源:random_variable.py
示例10: __init__
def __init__(self, base=ZZ):
ParentWithBase.__init__(self, base)
开发者ID:pombredanne,项目名称:spd_notebook,代码行数:2,代码来源:formal_sum.py
注:本文中的sage.structure.parent_base.ParentWithBase类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论