本文整理汇总了Python中sage.groups.abelian_gps.abelian_group_element.AbelianGroupElement._div_方法的典型用法代码示例。如果您正苦于以下问题:Python AbelianGroupElement._div_方法的具体用法?Python AbelianGroupElement._div_怎么用?Python AbelianGroupElement._div_使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.groups.abelian_gps.abelian_group_element.AbelianGroupElement
的用法示例。
在下文中一共展示了AbelianGroupElement._div_方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _div_
# 需要导入模块: from sage.groups.abelian_gps.abelian_group_element import AbelianGroupElement [as 别名]
# 或者: from sage.groups.abelian_gps.abelian_group_element.AbelianGroupElement import _div_ [as 别名]
def _div_(left, right):
"""
Divide ``left`` by ``right``
TESTS::
sage: G.<a,b> = AbelianGroupWithValues([5,2], 2)
sage: a._div_(b)
a*b^-1
sage: a/b
a*b^-1
sage: (a/b).value()
5/2
"""
m = AbelianGroupElement._div_(left, right)
m._value = left.value() / right.value()
return m
示例2: _div_
# 需要导入模块: from sage.groups.abelian_gps.abelian_group_element import AbelianGroupElement [as 别名]
# 或者: from sage.groups.abelian_gps.abelian_group_element.AbelianGroupElement import _div_ [as 别名]
def _div_(self, other):
r"""
Division of two ideal classes.
EXAMPLE::
sage: G = NumberField(x^2 + 23,'a').class_group(); G
Class group of order 3 with structure C3 of Number Field in a with defining polynomial x^2 + 23
sage: I = G.0; I
Fractional ideal class (2, 1/2*a - 1/2)
sage: I*I # indirect doctest
Fractional ideal class (2, 1/2*a + 1/2)
sage: I*I*I # indirect doctest
Trivial principal fractional ideal class
"""
m = AbelianGroupElement._div_(self, other)
m._value = (self.ideal() / other.ideal()).reduce_equiv()
return m