Beispiel #1
0
def read_quaddobl_system(filename):
    r"""
    Opens the *filename* for reading a polynomial system
    with coefficients in quad double precision.
    Returns the list of polynomials in the system
    or *None* if something went wrong.
    """
    from phcpy.phcpy2c2 import py2c_syscon_clear_symbol_table
    from phcpy.phcpy2c2 import py2c_read_quaddobl_target_system_from_file
    from phcpy.phcpy2c2 import py2c_copy_quaddobl_target_system_to_container
    py2c_syscon_clear_symbol_table()
    lnf = len(filename)
    fail = py2c_read_quaddobl_target_system_from_file(lnf, filename)
    if (fail != 0):
        return None
    else:
        py2c_copy_quaddobl_target_system_to_container()
        return load_quaddobl_system()
Beispiel #2
0
def read_quaddobl_system(filename):
    r"""
    Opens the *filename* for reading a polynomial system
    with coefficients in quad double precision.
    Returns the list of polynomials in the system
    or *None* if something went wrong.
    """
    from phcpy.phcpy2c2 import py2c_syscon_clear_symbol_table
    from phcpy.phcpy2c2 import py2c_read_quaddobl_target_system_from_file
    from phcpy.phcpy2c2 import py2c_copy_quaddobl_target_system_to_container
    py2c_syscon_clear_symbol_table()
    lnf = len(filename)
    fail = py2c_read_quaddobl_target_system_from_file(lnf,filename)
    if(fail != 0):
        return None
    else:
        py2c_copy_quaddobl_target_system_to_container()
        return load_quaddobl_system()
Beispiel #3
0
def read_quaddobl_system_and_solutions(filename):
    r"""
    Opens the *filename* for reading a polynomial system
    with coefficients in quad double precision,
    and its corresponding list of solutions.
    Returns *None* if the reading went wrong, or otherwise
    returns a tuple with first the list of polynomials
    and second the list of solutions.
    """
    from phcpy.phcpy2c2 import py2c_syscon_clear_symbol_table
    from phcpy.phcpy2c2 import py2c_read_quaddobl_start_system_from_file
    from phcpy.phcpy2c2 import py2c_copy_quaddobl_start_system_to_container
    from phcpy.phcpy2c2 import py2c_copy_quaddobl_start_solutions_to_container
    py2c_syscon_clear_symbol_table()
    lnf = len(filename)
    fail = py2c_read_quaddobl_start_system_from_file(lnf, filename)
    if (fail != 0):
        return None
    else:
        py2c_copy_quaddobl_start_system_to_container()
        py2c_copy_quaddobl_start_solutions_to_container()
        return (load_quaddobl_system(), load_quaddobl_solutions())
Beispiel #4
0
def read_quaddobl_system_and_solutions(filename):
    r"""
    Opens the *filename* for reading a polynomial system
    with coefficients in quad double precision,
    and its corresponding list of solutions.
    Returns *None* if the reading went wrong, or otherwise
    returns a tuple with first the list of polynomials
    and second the list of solutions.
    """
    from phcpy.phcpy2c2 import py2c_syscon_clear_symbol_table
    from phcpy.phcpy2c2 import py2c_read_quaddobl_start_system_from_file
    from phcpy.phcpy2c2 import py2c_copy_quaddobl_start_system_to_container
    from phcpy.phcpy2c2 import py2c_copy_quaddobl_start_solutions_to_container
    py2c_syscon_clear_symbol_table()
    lnf = len(filename)
    fail = py2c_read_quaddobl_start_system_from_file(lnf,filename)
    if(fail != 0):
        return None
    else:
        py2c_copy_quaddobl_start_system_to_container()
        py2c_copy_quaddobl_start_solutions_to_container()
        return (load_quaddobl_system(), load_quaddobl_solutions())