def store_quaddobl_laurent_system(polsys, **nbvar): r""" Stores the Laurent polynomials represented by the list of strings in *polsys* into the container for systems with coefficients in quad double precision. If *nbvar* is omitted, then the system is assumed to be square. Otherwise, suppose the number of variables equals 2 and pols is the list of polynomials, then **store_quaddobl_Laurent_system(pols, nbvar=2)** stores the polynomials in pols in the quaddobl Laurent systems container. """ from phcpy.phcpy2c2 import py2c_syscon_clear_quaddobl_Laurent_system from phcpy.phcpy2c2 \ import py2c_syscon_initialize_number_of_quaddobl_Laurentials from phcpy.phcpy2c2 import py2c_syscon_store_quaddobl_Laurential py2c_syscon_clear_quaddobl_Laurent_system() dim = len(polsys) fail = 0 py2c_syscon_initialize_number_of_quaddobl_Laurentials(dim) for cnt in range(0, dim): pol = polsys[cnt] nchar = len(pol) if len(nbvar) == 0: fail = py2c_syscon_store_quaddobl_Laurential( nchar, dim, cnt + 1, pol) else: nvr = nbvar.values()[0] fail = py2c_syscon_store_quaddobl_Laurential( nchar, nvr, cnt + 1, pol) if (fail != 0): break return fail
def store_quaddobl_laurent_system(polsys, **nbvar): r""" Stores the Laurent polynomials represented by the list of strings in *polsys* into the container for systems with coefficients in quad double precision. If *nbvar* is omitted, then the system is assumed to be square. Otherwise, suppose the number of variables equals 2 and pols is the list of polynomials, then **store_quaddobl_Laurent_system(pols, nbvar=2)** stores the polynomials in pols in the quaddobl Laurent systems container. """ from phcpy.phcpy2c2 import py2c_syscon_clear_quaddobl_Laurent_system from phcpy.phcpy2c2 \ import py2c_syscon_initialize_number_of_quaddobl_Laurentials from phcpy.phcpy2c2 import py2c_syscon_store_quaddobl_Laurential py2c_syscon_clear_quaddobl_Laurent_system() dim = len(polsys) fail = 0 py2c_syscon_initialize_number_of_quaddobl_Laurentials(dim) for cnt in range(0, dim): pol = polsys[cnt] nchar = len(pol) if len(nbvar) == 0: fail = py2c_syscon_store_quaddobl_Laurential(nchar, dim, cnt+1, pol) else: nvr = nbvar.values()[0] fail = py2c_syscon_store_quaddobl_Laurential(nchar, nvr, cnt+1, pol) if(fail != 0): break return fail
def quaddobl_solve(pols, silent=False, tasks=0): """ Calls the blackbox solver. On input in pols is a list of strings. By default, the solver will print to screen the computed root counts. To make the solver silent, set the flag silent to True. The number of tasks for multithreading is given by tasks. The solving happens in quad double precision arithmetic. """ from phcpy.phcpy2c2 import py2c_syscon_clear_quaddobl_Laurent_system from phcpy.phcpy2c2 \ import py2c_syscon_initialize_number_of_quaddobl_Laurentials from phcpy.phcpy2c2 import py2c_syscon_store_quaddobl_Laurential from phcpy.phcpy2c2 import py2c_solcon_clear_quaddobl_solutions from phcpy.phcpy2c2 import py2c_solve_quaddobl_Laurent_system from phcpy.interface import load_quaddobl_solutions py2c_syscon_clear_quaddobl_Laurent_system() py2c_solcon_clear_quaddobl_solutions() dim = len(pols) py2c_syscon_initialize_number_of_quaddobl_Laurentials(dim) for ind in range(0, dim): pol = pols[ind] nchar = len(pol) py2c_syscon_store_quaddobl_Laurential(nchar, dim, ind+1, pol) py2c_solve_quaddobl_Laurent_system(silent, tasks) return load_quaddobl_solutions()
def store_quaddobl_laurent_system(polsys): """ Stores the Laurent polynomials represented by the list of strings in polsys into the container for systems with coefficients in quad double precision. """ from phcpy.phcpy2c2 import py2c_syscon_clear_quaddobl_Laurent_system from phcpy.phcpy2c2 \ import py2c_syscon_initialize_number_of_quaddobl_Laurentials from phcpy.phcpy2c2 import py2c_syscon_store_quaddobl_Laurential py2c_syscon_clear_quaddobl_Laurent_system() dim = len(polsys) py2c_syscon_initialize_number_of_quaddobl_Laurentials(dim) for cnt in range(0, dim): pol = polsys[cnt] nchar = len(pol) fail = py2c_syscon_store_quaddobl_Laurential(nchar, dim, cnt+1, pol) if(fail != 0): break return fail