Пример #1
0
def solve(problems):
    """
    Runs the Littlewood-Richardson homotopies on the problems.
    """
    from phcpy.schubert import littlewood_richardson_homotopies as lrhom
    (k, n) = (4, 8) # in G(4,8)
    for (brackets, count) in problems:
        print(brackets, '=', count)
        (rc, flags, pols, sols) = lrhom(n, k, brackets)
        assert(len(sols) == count)
Пример #2
0
def test_basic(prc='d'):
    """
    Performs a basic test on the Littlewood-Richardson homotopies.
    """
    from phcpy.schubert import littlewood_richardson_homotopies as lrhom
    brk = [[2, 4, 6], [2, 4, 6], [2, 4, 6]]
    print('basic test with brackets', brk)
    (roco, flags, fsys, sols) = lrhom(6, 3, brk, precision=prc)
    print('the root count :', roco)
    print('the flags :', flags)
    print('the solutions :')
    for sol in sols:
        print(sol)
    verify(fsys, sols)
    print('number of solutions :', len(sols))
Пример #3
0
def test_basic(prc='d'):
    """
    Performs a basic test on the Littlewood-Richardson homotopies.
    """
    from phcpy.schubert import littlewood_richardson_homotopies as lrhom
    brk = [[2, 4, 6], [2, 4, 6], [2, 4, 6]]
    print('basic test with brackets', brk)
    (roco, flags, fsys, sols) = lrhom(6, 3, brk, precision=prc)
    print('the root count :', roco)
    print('the flags :', flags)
    print('the solutions :')
    for sol in sols:
        print(sol)
    verify(fsys, sols)
    print('number of solutions :', len(sols))
Пример #4
0
def test_p1(prc='d'):
    """
    First big problem in G(4,8).
    """
    from phcpy.schubert import littlewood_richardson_homotopies as lrhom
    brk = [[3, 6, 7, 8], [3, 6, 7, 8], [3, 6, 7, 8], [3, 6, 7, 8], \
        [3, 6, 7, 8], [3, 6, 7, 8], [3, 6, 7, 8], [4, 6, 7, 8], \
        [4, 6, 7, 8]]
    print('basic test with brackets', brk)
    (roco, flags, fsys, sols) = lrhom(8, 4, brk, precision=prc)
    print('the root count :', roco)
    print('the flags :', flags)
    print('the solutions :')
    for sol in sols:
        print(sol)
    verify(fsys, sols)
    print('number of solutions :', len(sols))
Пример #5
0
def test_p1(prc='d'):
    """
    First big problem in G(4,8).
    """
    from phcpy.schubert import littlewood_richardson_homotopies as lrhom
    brk = [[3, 6, 7, 8], [3, 6, 7, 8], [3, 6, 7, 8], [3, 6, 7, 8], \
        [3, 6, 7, 8], [3, 6, 7, 8], [3, 6, 7, 8], [4, 6, 7, 8], \
        [4, 6, 7, 8]]
    print('basic test with brackets', brk)
    (roco, flags, fsys, sols) = lrhom(8, 4, brk, precision=prc)
    print('the root count :', roco)
    print('the flags :', flags)
    print('the solutions :')
    for sol in sols:
        print(sol)
    verify(fsys, sols)
    print('number of solutions :', len(sols))