本文整理汇总了Python中sage.modular.cusps.Cusp.apply方法的典型用法代码示例。如果您正苦于以下问题:Python Cusp.apply方法的具体用法?Python Cusp.apply怎么用?Python Cusp.apply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.modular.cusps.Cusp
的用法示例。
在下文中一共展示了Cusp.apply方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _find_cusps
# 需要导入模块: from sage.modular.cusps import Cusp [as 别名]
# 或者: from sage.modular.cusps.Cusp import apply [as 别名]
def _find_cusps(self):
r"""
Calculate a list of inequivalent cusps.
EXAMPLES::
sage: sage.modular.arithgroup.congroup_generic.CongruenceSubgroup(5)._find_cusps()
Traceback (most recent call last):
...
NotImplementedError
NOTE: There is a generic algorithm implemented at the top level that
uses the coset representatives of self. This is *very slow* and for all
the standard congruence subgroups there is a quicker way of doing it,
so this should usually be overridden in subclasses; but it doesn't have
to be.
"""
i = Cusp([1,0])
L = [i]
for a in self.coset_reps():
ai = i.apply([a.a(), a.b(), a.c(), a.d()])
new = 1
for v in L:
if self.are_equivalent(ai, v):
new = 0
break
if new == 1:
L.append(ai)
return L