本文整理匯總了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