当前位置: 首页>>代码示例>>Python>>正文


Python DirichletGroup.galois_orbits方法代码示例

本文整理汇总了Python中sage.modular.dirichlet.DirichletGroup.galois_orbits方法的典型用法代码示例。如果您正苦于以下问题:Python DirichletGroup.galois_orbits方法的具体用法?Python DirichletGroup.galois_orbits怎么用?Python DirichletGroup.galois_orbits使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sage.modular.dirichlet.DirichletGroup的用法示例。


在下文中一共展示了DirichletGroup.galois_orbits方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: render_elliptic_modular_form_space

# 需要导入模块: from sage.modular.dirichlet import DirichletGroup [as 别名]
# 或者: from sage.modular.dirichlet.DirichletGroup import galois_orbits [as 别名]
def render_elliptic_modular_form_space(level=None, weight=None, character=None, label=None, **kwds):
    r"""
    Render the webpage for a elliptic modular forms space.
    """
    emf_logger.debug("In render_elliptic_modular_form_space kwds: {0}".format(kwds))
    emf_logger.debug("Input: level={0},weight={1},character={2},label={3}".format(level, weight, character, label))
    info = to_dict(kwds)
    info["level"] = level
    info["weight"] = weight
    info["character"] = character
    # if kwds.has_key('character') and kwds['character']=='*':
    #    return render_elliptic_modular_form_space_list_chars(level,weight)
    if character == 0:
        dimtbl = DimensionTable()
    else:
        dimtbl = DimensionTable(1)
    if not dimtbl.is_in_db(level, weight, character):
        emf_logger.debug("Data not available")
        if character == 0:
            d = dimension_new_cusp_forms(level, weight)
        else:
            D = DirichletGroup(level)
            x = D.galois_orbits(reps_only=True)[character]
            d = dimension_new_cusp_forms(x, weight)
        if d > 0:
            return render_template("not_available.html")
        else:
            info["is_empty"] = True
            return render_template("emf_space.html", **info)

    emf_logger.debug("Created dimension table in render_elliptic_modular_form_space")
    info = set_info_for_modular_form_space(**info)
    emf_logger.debug("keys={0}".format(info.keys()))
    if "download" in kwds and "error" not in kwds:
        return send_file(info["tempfile"], as_attachment=True, attachment_filename=info["filename"])
    if "dimension_newspace" in kwds and kwds["dimension_newspace"] == 1:
        # if there is only one orbit we list it
        emf_logger.debug("Dimension of newforms is one!")
        info["label"] = "a"
        return redirect(url_for("emf.render_elliptic_modular_forms", **info))
    info["title"] = "Newforms of weight %s on \(\Gamma_{0}(%s)\)" % (weight, level)
    bread = [(EMF_TOP, url_for("emf.render_elliptic_modular_forms"))]
    bread.append(("Level %s" % level, url_for("emf.render_elliptic_modular_forms", level=level)))
    bread.append(("Weight %s" % weight, url_for("emf.render_elliptic_modular_forms", level=level, weight=weight)))
    # emf_logger.debug("friends={0}".format(friends))
    info["bread"] = bread
    return render_template("emf_space.html", **info)
开发者ID:cgjj44,项目名称:lmfdb,代码行数:49,代码来源:emf_render_elliptic_modular_form_space.py


注:本文中的sage.modular.dirichlet.DirichletGroup.galois_orbits方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。