本文整理匯總了Python中sage.combinat.sf.sf.SymmetricFunctions.s方法的典型用法代碼示例。如果您正苦於以下問題:Python SymmetricFunctions.s方法的具體用法?Python SymmetricFunctions.s怎麽用?Python SymmetricFunctions.s使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sage.combinat.sf.sf.SymmetricFunctions
的用法示例。
在下文中一共展示了SymmetricFunctions.s方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from sage.combinat.sf.sf import SymmetricFunctions [as 別名]
# 或者: from sage.combinat.sf.sf.SymmetricFunctions import s [as 別名]
def __init__(self, R, k, t=None):
"""
EXAMPLES::
sage: kSchurFunctions(QQ, 3).base_ring()
doctest:1: DeprecationWarning: Deprecation warning: Please use SymmetricFunctions(QQ).kschur() instead!
See http://trac.sagemath.org/5457 for details.
Univariate Polynomial Ring in t over Rational Field
sage: kSchurFunctions(QQ, 3, t=1).base_ring()
Rational Field
sage: ks3 = kSchurFunctions(QQ, 3)
sage: ks3 == loads(dumps(ks3))
True
"""
self.k = k
self._name = "k-Schur Functions at level %s"%k
self._prefix = "ks%s"%k
self._element_class = kSchurFunctions_t.Element
if t is None:
R = R['t']
self.t = R.gen()
elif t not in R:
raise ValueError, "t (=%s) must be in R (=%s)"%(t,R)
else:
self.t = R(t)
if str(t) != 't':
self._name += " with t=%s"%self.t
self._s_to_self_cache = s_to_k_cache.get(k, {})
self._self_to_s_cache = k_to_s_cache.get(k, {})
# This is an abuse, since kschur functions do not form a basis of Sym
from sage.combinat.sf.sf import SymmetricFunctions
Sym = SymmetricFunctions(R)
sfa.SymmetricFunctionAlgebra_generic.__init__(self, Sym)
# so we need to take some counter measures
self._basis_keys = sage.combinat.partition.Partitions(max_part=k)
# The following line is just a temporary workaround to keep
# the repr of those k-schur as they were before #13404; since
# they are deprecated, there is no need to bother about them.
self.rename(self._name+" over %s"%self.base_ring())
self._s = Sym.s()
# temporary until Hom(GradedHopfAlgebrasWithBasis work better)
category = sage.categories.all.ModulesWithBasis(self.base_ring())
# This really should be a conversion, not a coercion (it can fail)
self .register_coercion(SetMorphism(Hom(self._s, self, category), self._s_to_self))
self._s.register_coercion(SetMorphism(Hom(self, self._s, category), self._self_to_s))