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)
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))
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))