コード例 #1
0
ファイル: main.py プロジェクト: SamSchiavone/lmfdb
def artin_postprocess(res, info, query):
    gp_labels = list(
        set([rec["GaloisLabel"]
             for rec in res] + [rec["Container"].upper() for rec in res] +
            ["T".join(str(c) for c in rec["Proj_nTj"]) for rec in res]))
    cache = knowl_cache(gp_labels)
    return [ArtinRepresentation(data=x, knowl_cache=cache) for x in res]
コード例 #2
0
def nf_postprocess(res, info, query):
    galois_labels = [rec["galois_label"] for rec in res if rec.get("galois_label")]
    cache = knowl_cache(list(set(galois_labels)))
    for rec in res:
        wnf = WebNumberField.from_data(rec)
        rec["poly"] = wnf.web_poly()
        rec["disc"] = wnf.disc_factored_latex()
        rec["galois"] = wnf.galois_string(cache=cache)
        rec["class_group_desc"] = wnf.class_group_invariants()
    return res
コード例 #3
0
ファイル: main.py プロジェクト: cscmnu/lmfdb
def galcache():
    return knowl_cache(db.lf_fields.distinct("galois_label"))
コード例 #4
0
def contcache():
    return knowl_cache([label for label in db.artin_reps.distinct("Container") if "T" in label])
コード例 #5
0
def projcache():
    return knowl_cache(["%sT%s" % tuple(label) for label in db.artin_reps.distinct("Proj_nTj")])
コード例 #6
0
def galcache():
    return knowl_cache(db.artin_reps.distinct("GaloisLabel"))
コード例 #7
0
ファイル: main.py プロジェクト: assaferan/lmfdb
def lf_postprocess(res, info, query):
    cache = knowl_cache(list(set([f"{rec['n']}T{rec['gal']}" for rec in res])))
    for rec in res:
        rec["cache"] = cache
    return res