Exemple #1
0
def littelmann_image():
    from sage.all_cmdline import vector, line

    def line_of_path(path):
        if path is None:
            result = []
        else:
            L = path.parent().weight.parent()
            v = vector(L.zero())
            result = [v]
            for d in path.value:
                v = v + vector(d)
                result.append(v)
        result = list(result)
        result = line(result)
        result.set_axes_range(-10, 10, -10, 10)
        return result

    crystal = request.args.get("crystal")
    C = make_path_crystal(crystal)
    element = int(request.args.get("element"))
    i = int(request.args.get("i"))
    l = int(request.args.get("l"))
    x = C[element]
    if l >= 0:
        y = x.f_string([i] * l)
    else:
        y = x.e_string([i] * -l)

    from lmfdb.utils import image_callback

    return image_callback(line_of_path(y))
Exemple #2
0
def hgm_family_circle_image(AB):
    A, B = AB.split("_")
    from .plot import circle_image
    A = [int(n) for n in A[1:].split(".")]
    B = [int(n) for n in B[1:].split(".")]
    G = circle_image(A, B)
    return image_callback(G)
Exemple #3
0
def hgm_family_circle_image(AB):
    A,B = AB.split("_")
    from plot import circle_image
    A = map(int,A[1:].split("."))
    B = map(int,B[1:].split("."))
    G = circle_image(A, B)
    return image_callback(G)
Exemple #4
0
def hgm_family_circle_image(AB):
    A, B = AB.split("_")
    from plot import circle_image
    A = map(int, A[1:].split("."))
    B = map(int, B[1:].split("."))
    G = circle_image(A, B)
    return image_callback(G)
Exemple #5
0
def littelmann_image():
    from sage.all_cmdline import vector, line

    def line_of_path(path):
        if path is None:
            result = []
        else:
            L = path.parent().weight.parent()
            v = vector(L.zero())
            result = [v]
            for d in path.value:
                v = v + vector(d)
                result.append(v)
        result = list(result)
        result = line(result)
        result.set_axes_range(-10, 10, -10, 10)
        return result

    crystal = request.args.get("crystal")
    C = make_path_crystal(crystal)
    element = int(request.args.get("element"))
    i = int(request.args.get("i"))
    l = int(request.args.get("l"))
    x = C[element]
    if l >= 0:
        y = x.f_string([i] * l)
    else:
        y = x.e_string([i] * -l)

    from lmfdb.utils import image_callback
    return image_callback(line_of_path(y))
Exemple #6
0
def hgm_family_constant_image(AB):
    # piecewise constant
    A, B = AB.split("_")
    from .plot import piecewise_constant_image
    A = [int(n) for n in A[1:].split(".")]
    B = [int(n) for n in B[1:].split(".")]
    G = piecewise_constant_image(A, B)
    return image_callback(G)
Exemple #7
0
def hgm_family_constant_image(AB):
    # piecewise constant
    A,B = AB.split("_")
    from plot import piecewise_constant_image
    A = map(int,A[1:].split("."))
    B = map(int,B[1:].split("."))
    G = piecewise_constant_image(A, B)
    return image_callback(G)
Exemple #8
0
def hgm_family_constant_image(AB):
    # piecewise constant
    A, B = AB.split("_")
    from plot import piecewise_constant_image
    A = map(int, A[1:].split("."))
    B = map(int, B[1:].split("."))
    G = piecewise_constant_image(A, B)
    return image_callback(G)