本文整理汇总了Python中sage.groups.abelian_gps.abelian_group_element.AbelianGroupElement._mul_方法的典型用法代码示例。如果您正苦于以下问题:Python AbelianGroupElement._mul_方法的具体用法?Python AbelianGroupElement._mul_怎么用?Python AbelianGroupElement._mul_使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.groups.abelian_gps.abelian_group_element.AbelianGroupElement
的用法示例。
在下文中一共展示了AbelianGroupElement._mul_方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _mul_
# 需要导入模块: from sage.groups.abelian_gps.abelian_group_element import AbelianGroupElement [as 别名]
# 或者: from sage.groups.abelian_gps.abelian_group_element.AbelianGroupElement import _mul_ [as 别名]
def _mul_(self, other):
r"""
Multiplication of two (S-)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
sage: K.<a> = QuadraticField(-14)
sage: I = K.ideal(2,a)
sage: S = (I,)
sage: CS = K.S_class_group(S)
sage: G = K.ideal(3,a+1)
sage: CS(G)*CS(G)
Trivial S-ideal class
"""
m = AbelianGroupElement._mul_(self, other)
m._value = (self.ideal() * other.ideal()).reduce_equiv()
return m
示例2: _mul_
# 需要导入模块: from sage.groups.abelian_gps.abelian_group_element import AbelianGroupElement [as 别名]
# 或者: from sage.groups.abelian_gps.abelian_group_element.AbelianGroupElement import _mul_ [as 别名]
def _mul_(left, right):
"""
Multiply ``left`` and ``right``
TESTS::
sage: G.<a,b> = AbelianGroupWithValues([5,2], 2)
sage: a._mul_(b)
a*b
sage: a*b
a*b
sage: (a*b).value()
10
"""
m = AbelianGroupElement._mul_(left, right)
m._value = left.value() * right.value()
return m
示例3: _mul_
# 需要导入模块: from sage.groups.abelian_gps.abelian_group_element import AbelianGroupElement [as 别名]
# 或者: from sage.groups.abelian_gps.abelian_group_element.AbelianGroupElement import _mul_ [as 别名]
def _mul_(self, other):
r"""
Multiplies together two S-ideal classes.
EXAMPLES::
sage: K.<a> = QuadraticField(-14)
sage: I = K.ideal(2,a)
sage: S = (I,)
sage: CS = K.S_class_group(S)
sage: G = K.ideal(3,a+1)
sage: CS(G)*CS(G)
Trivial S-ideal class
"""
m = AbelianGroupElement._mul_(self, other)
return SFractionalIdealClass(self.parent(), (self.ideal() * other.ideal()).reduce_equiv(), m.list())